Skip to content

kruspy/erc20-token-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERC20 Token CLI Tool

Learning CLI tool to create, deploy and interact with ERC20 tokens using Go.

Installation

  1. Install Go. The project currently uses version 1.18.
  2. Install npm.
  3. Install solc compiler and abigen.
  4. Run make in order to compile the contract and install the CLI tool.
  5. Run tokencli --help and the tool help message will appear.

Contract Implementation

The main contract is already defined here and just implements the ERC20 interface.

The contract implementation overrides the decimal() method of the ERC20 interface to allow a 6 decimal representation. This because the generated bindings only accept a big.Int which can represent values up to 64-bit signed integrers (9*10^18 aprox.). This would mean that only a totalSupply of 9 full tokens would be possible with 18 decimals. Since this is just a learning tool, the default decimals have been lowered to 6, allowing more possibilities.

License

The MIT License (MIT) 2022 - Marc Puig. Please have a look at the LICENSE for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published