Skip to content

zmzubraj/ERC20_Token_dApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERC20_Token_dApp

Small educational ERC20 token project built with Solidity and web3.py.

This repository combines:

  • a simple ERC20 token contract in ERC20.sol
  • a compiled ABI in MyTokenABI.json
  • Python scripts for RPC connectivity, balance checks, and token transfers

It is best understood as a learning/demo repo rather than production-ready token infrastructure.

Repository structure

ERC20.sol
MyTokenABI.json
Connect.py
Token_dApp.py
Test.py

What each file does

  • ERC20.sol: basic OpenZeppelin-based ERC20 token contract named MyToken (MTK)
  • MyTokenABI.json: ABI used by the Python scripts to interact with the deployed contract
  • Connect.py: quick RPC connection check and latest-block lookup
  • Token_dApp.py: balance lookup and token transfer flow using a configured contract address
  • Test.py: alternate interactive transfer script against a configured token contract

Current script assumptions

The Python scripts currently:

  • connect to https://rpc-mumbai.maticvigil.com
  • expect a deployed token contract address to be hardcoded in the script
  • rely on the ABI file in the repo root

Before running anything against your own deployment, update the RPC endpoint and contract address to match the network you actually want to use.

Setup

  1. Install Python 3.
  2. Install the required dependency:
pip install web3
  1. If you deploy your own token, compile ERC20.sol and make sure the ABI in MyTokenABI.json matches the deployed contract.
  2. Update the contract address in Token_dApp.py or Test.py.

Basic usage

Check RPC connectivity:

python Connect.py

Run the token interaction flow:

python Token_dApp.py

Security note

Do not hardcode real private keys in source files or commit them to GitHub.

If you continue this project, move secrets into environment variables or a local config file that is excluded from version control.

Suggested next improvements

  • move RPC URLs and contract addresses into a config file or environment variables
  • remove plaintext private-key handling from the example scripts
  • add a requirements.txt
  • add deployment instructions for Remix, Hardhat, or Brownie
  • document the expected token decimals and deployment network

About

Educational ERC20 token demo with Solidity and web3.py scripts for basic contract interaction.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors