Skip to content

BeratOz01/sample-ido-factory

Repository files navigation

Summary

This application is a public launchpad where anyone can create their ERC20 token, and raise their project in a decentralized way. Or participate in other sales with an official payment token which can be requested every 10 minutes.

  • Create your ERC20 token with a name , symbol and total supply.
  • Participate other sales.
  • Create your sale with desired parameters
  • Keep track of all the sales and tokens which is created by the user.
  • See all participated sales on one page.
  • All the payments in Payment Token (contract), can request 10 PTK only after 10 minutes.
  • No backend, fully decentralized. Query blockchain for sale owner and sale informations
  • Minimum participate amount : 1 PTK
  • Maximum participate amount : 10 PTK
  • Solidity
  • React.js
  • web3.js
  • Ganache-cli
  • Truffle

Install Truffle

npm install -g truffle

Install Ganache-cli

npm install -g ganache-cli

Start Ganache-cli with networkId 1337

ganache-cli --networkId 1337

Clone this repository

git clone https://github.com/BeratOz01/sample-ido-factory

Install Dependencies

cd sample-ido-factory
npm install

Compile & Migrate Contract

truffle compile 
truffle migrate --reset --network development

Client

cd client
npm install 
npm run start
  • You need to connect localhost:8545 and import accounts from ganache-cli with private keys for send transaction.
  • User can create ERC20 tokens by not exceeding a total of 5 created tokens.

  • This tokens can be sold in sales. But cannot be used as payment token. For payment token check here.

  • As seen in the image below, user needs to enter,

    • name ,
    • symbol,
    • total supply of the token.
  • After this generation, token contract will mint all of the tokens to the owner so the owner can send this project tokens to a related sale for distribution. Also, users can see information about tokens on the Portfolio page, 'Created Tokens' section.

  • User can create token from this 'Create Your IDO' tab. tokenCreation

  • Token Creation Modal

  • User can create their own IDO sale from 'Create Your IDO' tab.
  • User needs to enter
    • name of sale
    • For vesting
      • Number Of Portions
      • Time Between Portions (in seconds)
      • Price of token in Payment Token (wei)
      • Project Token
        • Project token can be selected in 3 way,
          • First way, user can enter any ERC20 token address can be created outside of the applications.
          • Second way, user can use sample project token without creating.
          • Third way, user can select project token from created tokens which is described above.
  • After creation, sale will be on the home page and portfolio page in My Sales sections.
  • On the Home page, sales will appear by assigning a picture depending on the index of sales.

Sample Created Sale sample_created_sale

  • After creating ERC20 token and Sale contract. These contracts information will take place on Portfolio Page in related sections.
  • If user create ERC20 token from this application, these created tokens will be in Portfolio.

Sample sample_created_tokens

  • After creating sale user has to send enough amount of project token to sale contract. Otherwise sale contract will throw an error. So in 'Created Tokens' section. Users can send project tokens to related sale contracts.

Token Send Modal Screen Shot 2022-05-08 at 15 10 54

  • Application will show contracts where the selected token is the project token.
  • After sending enough project token to sale contract anyone can participate our IDO, if there is enough amount of project token inside sale contract.
  • User must has Payment Token to participate IDO.

Sale Details Screen Shot 2022-05-08 at 15 19 17

  • After user enter desired amount of Payment Token to input.
  • Buy Modal will pop-up and buyer need to approve enough amount of payment token to sale contract. Then buy project token

Buy Modal

buy-modal

  • After purchasing and closing buy modal , the page will refresh itself and vesting table will pop-up. If there is a portion that can be withdraw , withdraw button will be active. And update table information after withdraw transaction.

Vesting Table vesting-table

  • When user participate IDO, this table and more information will take place in 'Portfolio' page, in 'Participated Sales'.

Portfolio - Participated Sales Screen Shot 2022-05-08 at 15 32 20

*** Portfolio - Participated Sales After Withdraw*** Screen Shot 2022-05-08 at 15 33 07

  • There will be one official Payment Token for all Launchpad.
  • Users can request this Payment Token from Home page. Screen Shot 2022-05-08 at 15 36 20
  • But every address can request payment token in every 10 minutes.
  • Token Contract
  • Responsive UI
  • Better error handling

Linkedin Email

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages