D
D
DFinance
Search…
Fungible Token
Fungible token canister for developers

Introduction

Token standard is essential for the Internet Computer ecosystem, especially for the decentralized finance(DeFi) system, we implemented several token canister templates for the community and the developers can choose which they'd like to use.
You can find the code here: ic-token.
Currently, we are using this implementation in our products. Basically, it follows the ERC-20 style token interface and supports built-in transaction history storage.

Development

You need the latest DFINITY Canister SDK to be able to build and deploy a token canister:
1
sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
Copied!
Navigate to a token subdirectory and start a local development network:
1
cd erc20
2
dfx start --background
Copied!
Create canisters:
1
dfx canister create --all
Copied!
Install code for token canister:
1
dfx build
2
3
e.g.:
4
dfx canister install token --argument="(\"DFinance Coin\", \"DFC\", 8, 10000000000000000, principal \"4qehi-lqyo6-afz4c-hwqwo-lubfi-4evgk-5vrn5-rldx2-lheha-xs7a4-gae\")"
Copied!
Refer to demo.sh in the corresponding subdirectory for more details.

Contributing

We'd like to collaborate with the community to provide more and better token template options for the developers on the IC, if you have some ideas you'd like to discuss, submit an issue on Github or ping us in Discord.