Giter VIP home page Giter VIP logo

icon-dice-roll's Introduction

Reference:

https://gitlab.com/ibriz/icon-dice-roll

Deployment to local tbears instance

Run container

docker run -it -p 127.0.0.1:9000:9000 -p 127.0.0.1:5000:5000 --rm ibriz/icon-workshop:latest

Deploy with tbears

tbears deploy dice-roll -k keystores/keystore_test1.json -c config/tbears_cli_config.json

note: use test1_Account as password

Check result transaction

tbears txresult [txHASH]

Copy the scoreAddress from the result

Edit file testcmdline/send_set_treasury.json to update scoreAddress

Send 8 ICX to SCORE and check balance

tbears sendtx -k keystores/keystore_test1.json -c config/tbears_cli_config.json testcmdline/send_set_treasury.json
tbears balance [SCORE address]

Update default_score in /tbears/icon­dice­roll/webapp/main.py

Call fallback function in SCORE

Step 1: Edit to address by SCORE address

tbears sendtx -k keystores/keystore_test1.json -c config/tbears_cli_config.json testcmdline/send_bet.json

Note: Use key store of ICONex wallet

docker cp <file path> <container id>:/tbears/icon­dice roll/keystores/keystore1.json

Deployment to testnet

Faucet ICX testnet

Deploy

tbears deploy dice-roll -f <from address> -k keystores/keystore1.json -c config/tbears_cli_config_testnet.json

note: use p@ssword1 as password

Check transaction

tbears txresult txnhash -c config/tbears_cli_config_testnet.json

Testnet tracker: https://bicon.tracker.solidwallet.io/ put the score address

Run WEB APP

cd webapp/
python3 main.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.