One of the most popular applications of Ethereum is to issue your own cryptocurrency. In this tutorial, we’ll teach you how to issue your own cryptocurrency without/with code.

Before we start, we need to understand there are different types of cryptocurrency.

One is cryptocurrency in the consensus system of one blockchain network. For example, BTC in the bitcoin network, ETH in the Ethereum network. In this case, people first get the currency from a process called mining. Through the mining process, miners(or nodes) will get incentives to support the infrastructure of the blockchain network. All mechanism for the incentive is written in the code for the blockchain. People in the mining process support the price or value of the currency.

Another one is the token contract on the top of a blockchain. The most popular case is ERC20 token on Ethereum. You can deploy a token smart contract on a blockchain to issue your own token. It cost you just a little to deploy the contract on the blockchain. If you didn’t do other things to support the value of your own token, people may say it’s air-coin or shit-coin.

ERC20 is the most popular standard to issue your “contract token”. People often use ERC20 to issue their own token for their ICO for crowdfunding.

ie. ICO stands for “initial coin offering”, some blockchain project sell their coin before they build their project. Then build the project to interact with the coin.

Now, we can start.

Issue your own token without code

Pre-request: you need to have Ethereum-wallet, we suggest you use Chrome Extensions Metamask. Also you need to have ETH in your account.

In this tutorial, we use the “Ropsten Test Net”, you can get your “fake ETH” through https://faucet.ropsten.be

You can see “ETH” on Etherscan and your wallet.

Go to the ERC-20 generator to type

https://vittominacori.github.io/erc20-generator

You can see the wallet will ask you to pay the “gas fee” by ETH to deploy the contract.

It’s down, you can see your smart contract address, click to check information on etherscan

Also, you can check the etherscan with your wallet address

If you want to send your token to others, you can add the token on your wallet.

Congratulations! You have your own token now.

Let’s review the process to get the token.

Type properties we like for the token. (The ERC-20 generator actually helps you to put these parameters on the smart contract.) Click “Create Token” (The ERC-20 generator helps you to compile the smart contract into bytecode and deploy on Ethereum network.) Pay gas fee by ETH. (Every time you make transactions include deploying contract on Ethereum blockchain network, you need to pay the gas fee, it will go to the miners or nodes who support the network.) You can get transaction id address and token address. (Any transaction on Ethereum will get a transaction id address, people can check the detail of the transaction by the address on Etherscan or other Ethereum blockchain browser. For smart contract deployment, you can get a smart contract address, people can check is the contract remains the same with the original one.) You can add your token on your wallet. (Unlike third payment applications include Paypal or Alipay … etc. You can use any blockchain wallet that supports ERC-20. Since blockchain is a decentralized network, all token and transaction data are public to everyone, anyone can make their own application to access the data, and no single one can mute data. )

The ERC-20 generator provides only a simple version for your own token. If you like to have more functions or to interact with your own DApp, you still need to learn how to write a smart contracts and deploy on a blockchain.

Issue your own token by writing smart contract

OpenZeppelin package some useful smart contracts, we don’t need to write from scratch.

Let’s check ERC-20 smart contract on

https://docs.openzeppelin.com/contracts/2.x/erc20

and

https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC20

Let’s rewrite the smart contract.

pragma solidity ^0.6.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20Detailed.sol"; contract MyToken is ERC20, ERC20Detailed { uint256 public constant INITIAL_SUPPLY = 1e12 * (1e18); constructor() public ERC20Detailed("TokenName", "BRIEF", 18) { _mint(msg.sender, INITIAL_SUPPLY); } }

Check Github files if you like to have more functions.

You can set “TokenName”, “BRIEF” you like. Also, “INITIAL_SUPPLY” = [1e(“Token Cap Digit”)*1e(“Token Decimals”) ]. (We set “Token Cap Digit” to 12 if we want 1,000,000,000,000 tokens. mostly, people set “Token Decimals” to 18.)

Copy the contract into an online IDE. (General speaking, you need to run a Ethereum node if you want to deploy your contract, we can do it by online IDE. Remix help to run the node for you.)

https://remix.ethereum.org

Write smart contract

Compile smart contract into bytecode

Deploy on the Ethereum blockchain network

Pay gas fee

Done





Add your own token on your wallet

You can also check code on OpenZeppelin. The other thing you need to learn is how to interact with your own DApp with your own token.

Also, you can do all the above on main-net for the real world, the difference is you need to buy ETH or mint by your self.

Read More

Ethereum Dapp for Beginners – Full Stack Hello World Voting Ethereum Dapp Tutorial

Books for Ethereum Development on Amazon