ICIP-20


ICIP-20 token canisters manage and track fungible tokens. fungible tokens are completely interchangeable with each other. They hold the same value and are used for making payments and tracking balances. This is the vast majority of crypto currencies like BTC, and ETH.

Creating an ICIP-20 Token Canister


Canisters allow us to easliy create our own DIP20 Token,

Screenshot

Here is how it might look minting your tokens


dfx canister call token initialize "'(\"test token\", \"TT\", 0, 1000)'"
true

We're creating an inital supply of tokens that will be deposited to the Caller of the initialize method.

That’s it! Once initialized, we will be able to query the total supply:


dfx canister call token totalSupply '()'
(1_000)

We can also transfer these tokens to other accounts and query balances:


dfx canister call token transfer (Principle, amount)
dfx canister call token balanceOf (Principle)

Preset DIP20 Canister

DIP20

This canister is ready to deploy without having to write any Motoko code. It can be used as-is for quick prototyping and testing, but is also suitable for production environments.