Giter VIP home page Giter VIP logo

boilerplate-for-ico-staking's Introduction

Boilerplate for ICO & Staking

This boilerplate is for ICO & Staking application. Using this boilerplate, you can create ICO & Staking website.

img_40.png

img_41.png

img_42.png

img_43.png

img_44.png

How to create this application?

Deploy smart contracts

Please deploy ICO smart contract

  • Click Create Dapp box

img_2.png

  • Input DApp name

img_3.png

  • Select the chain you want to deploy the contracts on.

img_4.png

  • Search and select one of ERC20 token modules

If you have already an ERC20 token for ICO, you can skip this.

img_5.png

img_30.png

img_31.png

  • Input token name and symbol. (If you didn't select ERC20 module, you don't need to add the token name and symbol).
  • Input start time and end time in timestamp type. (endTime > startTime >= currentTime)

img_32.png

img_35.png

  • Clicking Deploy button, you can deploy the smart contracts using metamask wallet.

img_11.png

Now you can see the deployed contract information on DApp dashboard page.

ERC20: 0x8938F527D64243208B57F0bcc9253979af1DbcEB

ICO (public sale): 0x9D9F8f467A68c7F18f190D90a657dc2E734Cd89A

img_33.png

If you are going to use an ERC20 token already deployed, you can set the token address of ICO contract.

img_34.png

  • Click Create Dapp box

img_14.png

  • Select the chain you want to deploy the smart contracts on.

img_15.png

img_16.png

  • Input params.
_stkToken: ERC20 token address for staking.
_rewardPerBlock: Amount of reward token per block.
_feeWallet: Fee wallet address.
__maxFeePercent: Max fee percent. Here is 1000 means 100%.
_harvestFee: Harvest fee percent. Here is 1000 means 100% Harvest fee can't be more than maxFeePercent.

img_17.png

img_36.png

Please check this guide to learn more.

Deposit tokens for ICO & Staking

  • Transfer the token to ICO contract.

  • Deposit the token into Staking contract using depositReward function.

img_18.png

Create ICO Website

Clone ICO & Staking boilerplate repository.

Clone this repository

git clone https://github.com/lastrust/boilerplate-for-ICO-Staking

Install app

cd boilerplate-for-ICO-Staking

yarn install

Add contract addresses

Please update src/lib/web3_constants.ts file with the smart contract addresses you deployed.

import {BigNumber} from 'ethers';

export const Decimals = BigNumber.from(18);
export const OneToken = BigNumber.from(10).pow(Decimals);

export const ERC20TOKEN_ADDRESS = '';
export const ICO_ADDRESS = '';
export const STAKING_ADDRESS = '';

export const CHAIN_INFO = {
  chainId: '', // chainId in hex format. It is 0x5 for goerli.
  rpcUrls: [''], // rpc url.
  chainName: '',
  nativeCurrency: {
    name: 'ETH',
    symbol: 'ETH',
    decimals: 18,
  },
  blockExplorerUrls: [''], // https://goerli.etherscan.io
};

Run application

Development mode

yarn dev

Production mode

yarn build
yarn start

img_40.png

Now you can use this application.

To learn more, please ask in our discord

boilerplate-for-ico-staking's People

Contributors

smart-hunter avatar nailkhalimov 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.