ERC-20 tokens are blockchain-based assets that have value and can be sent and received. The primary difference is that instead of running on their own blockchain, ERC-20 tokens are issued on the Ethereum network.
Utilising the Truffle framework to test and deploy the token, this repo also contains a rudimentary front end, built with React, that allows users to 'buy' tokens in a crowd sale fashion, reminiscent of the infamous 2017/18 ICO era.
Unit tests of the Smart Contracts, written in Solidity, were performed using JavaScript with Mocha and Chai. These can be found in the /test directory. Said contracts were deployed to Truffle’s local development network before being deployed and tested on the Ropsten and Goerli networks.
💰 Tokenization of any assets as fungible tokens (ERC20)
🏦 Creation of bonus programs, vouchers, etc
💲 Creation of a new crypto currency
🧾 Creation of a payment-layer on top of Ethereum
🧰 Develop deeper understanding of truffle-config files
🤖 Understand deployment of dApps
🦸♂️ Understand tokenization using Open-Zeppelin Smart Contracts
☑️ Deep dive into unit-testing
- Enter the inital token supply and your wallet mnemonic in the env file
INITIAL_TOKENS=
MNEMONIC=
- If looking to deploy on ETH test networks or main net then enter the relevant URL path for your web3 connection in the truffle-config.js file (Infura was used for this project)
// Ethereum network of choice e.g:
ropsten_infura: {
provider: function() {
return new HDWalletProvider(process.env.MNEMONIC, "INSERT Web3 PROVIDER ADDRESS HERE", AccountIndex)
},
network_id: 3
}
- To run the front end locally (at http://localhost:3000), ensure you are in the "client" directory and use a terminal to execute the following
npm run start
- Changing the token's name and ticker can be acheived through editing MyToken.sol in /contracts (don't forget to update the front end too!)
constructor(uint256 initialSupply) ERC20Detailed("Azure","AZE", 0) public {
- Changes to the front end can be made by editing the App.js file found in /client/src
Distributed under the MIT License. See LICENSE
for more information.
Twitter - @0xTDF
LinkedIn - https://www.linkedin.com/in/RAMWatson/
Project Link: https://github.com/0xBlueshiftLabs/ERC20-Token-and-Sale