erc20-token-cli

module
v0.0.0-...-76b2023 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2022 License: MIT

README

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.

Directories

Path Synopsis
cmd
tokencli command
erc20-token-cli is a learning tool to interact with ERC20 smart contracts in the Ethereum chain.
erc20-token-cli is a learning tool to interact with ERC20 smart contracts in the Ethereum chain.
utils
Package utils contains internal helper functions for erc20-token-cli commands.
Package utils contains internal helper functions for erc20-token-cli commands.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL