Giter Site home page Giter Site logo

0xtdf / erc20-token-and-sale Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 7.0 535 KB

ERC20 token creation and sale. Utilising the Truffle framework to test and deploy the token, this repo also contains a rudimentary front end, built using React, that allows users to 'buy' tokens.

License: MIT License

Shell 0.11% HTML 6.12% CSS 2.41% JavaScript 57.02% Solidity 34.33%
web3 react javascript erc20 token-sale solidity smart-contracts ethereum dapp html

erc20-token-and-sale's Introduction

MIT License LinkedIn

ERC20 Token Creation and Crowd Sale

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.

Real-World Use-Cases

💰 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

Development-Goals

🧰 Develop deeper understanding of truffle-config files

🤖 Understand deployment of dApps

🦸‍♂️ Understand tokenization using Open-Zeppelin Smart Contracts

☑️ Deep dive into unit-testing

Built With

Getting Started

  1. Enter the inital token supply and your wallet mnemonic in the env file
 INITIAL_TOKENS=
 MNEMONIC=
  1. 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
  }
  1. 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

  1. 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 {
  1. Changes to the front end can be made by editing the App.js file found in /client/src

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Twitter - @0xTDF

LinkedIn - https://www.linkedin.com/in/RAMWatson/

Project Link: https://github.com/0xTDF/ERC20-Token-and-Sale

Acknowledgements

erc20-token-and-sale's People

Contributors

0xtdf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.