https://github.com/richardwarepam16/token
This is a project in which I have created my own token for the first time with Motoko.
https://github.com/richardwarepam16/token
blockchain crypto html-css-javascript motoko-language reactjs token tokens
Last synced: 7 months ago
JSON representation
This is a project in which I have created my own token for the first time with Motoko.
- Host: GitHub
- URL: https://github.com/richardwarepam16/token
- Owner: richardwarepam16
- Created: 2022-04-14T09:23:52.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-14T09:25:38.000Z (over 3 years ago)
- Last Synced: 2025-01-22T02:23:33.092Z (9 months ago)
- Topics: blockchain, crypto, html-css-javascript, motoko-language, reactjs, token, tokens
- Language: JavaScript
- Homepage:
- Size: 323 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crypto token
This is a project in which I have created my own token for the first time with Motoko.
# Check your Balance
1. Find out your principal id:
```
dfx identity get-principal
```2. Save it somewhere.
e.g. My principal id is: blah-blah-blah
3. Format and store it in a command line variable:
```
OWNER_PUBLIC_KEY="principal \"$( \dfx identity get-principal )\""
```4. Check that step 3 worked by printing it out:
```
echo $OWNER_PUBLIC_KEY
```5. Check the owner's balance:
```
dfx canister call token balanceOf "( $OWNER_PUBLIC_KEY )"
```# Charge the Canister
1. Check canister ID:
```
dfx canister id token
```2. Save canister ID into a command line variable:
```
CANISTER_PUBLIC_KEY="principal \"$( \dfx canister id token )\""
```3. Check canister ID has been successfully saved:
```
echo $CANISTER_PUBLIC_KEY
```4. Transfer half a billion tokens to the canister Principal ID:
```
dfx canister call token transfer "($CANISTER_PUBLIC_KEY, 500_000_000)"
```# Deploy the Project to the Live IC Network
1. Create and deploy canisters:
```
dfx deploy --network ic
```2. Check the live canister ID:
```
dfx canister --network ic id token
```3. Save the live canister ID to a command line variable:
```
LIVE_CANISTER_KEY="principal \"$( \dfx canister --network ic id token )\""
```4. Check that it worked:
```
echo $LIVE_CANISTER_KEY
```5. Transfer some tokens to the live canister:
```
dfx canister --network ic call token transfer "($LIVE_CANISTER_KEY, 50_000_000)"
```6. Get live canister front-end id:
```
dfx canister --network ic id token_assets
```7. Copy the id from step 6 and add .raw.ic0.app to the end to form a URL.
e.g. blah-blah-blah.raw.ic0.app