Giter Club home page Giter Club logo

codetoken's Introduction

How to run project

  1. Run npm install as it will install the dependecies

  2. Open three terminal sessions

  3. Run these commands in each of them

dfx start
dfx deploy
npm start
  1. You can check the project at local host 8080

Check your Balance

  1. Find out your principal id:
dfx identity get-principal
  1. Save it somewhere.

  2. Format and store it in a command line variable:

OWNER_PUBLIC_KEY="principal \"$( \dfx identity get-principal )\""
  1. Check that step 3 worked by printing it out:
echo $OWNER_PUBLIC_KEY
  1. Check the owner's balance:
dfx canister call token balanceOf "( $OWNER_PUBLIC_KEY )"

Deploy the Project to the Live IC Network

  1. Create and deploy canisters:
dfx deploy --network ic
  1. Check the live canister ID:
dfx canister --network ic id token
  1. Save the live canister ID to a command line variable:
LIVE_CANISTER_KEY="principal \"$( \dfx canister --network ic id token )\""
  1. Check that it worked:
echo $LIVE_CANISTER_KEY
  1. Transfer some tokens to the live canister:
dfx canister --network ic call token transfer "($LIVE_CANISTER_KEY, 50_000_000)"
  1. Get live canister front-end id:
dfx canister --network ic id token_assets
  1. Copy the id from step 6 and add .raw.ic0.app to the end to form a URL. e.g. zdv65-7qaaa-aaaai-qibdq-cai.raw.ic0.app

codetoken's People

Contributors

gauravkumar5089 avatar

Watchers

 avatar

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.