Skip to content

hir0min/ido-and-ino-launchpad

Repository files navigation

IDO and INO Launchpad

Launpad smart contracts support IDO (Initial Dex Offering for ERC20) and INO (Initial NFT Offering for ERC721 and ERC1155).

Features

  • Support contract upgradeable
  • Solidity 0.8.x
  • Governance
  • Lazy-minting for ERC721 and ERC1155
  • Contract factory for INO

Set up

Node >= 10.x && yarn > 1.x

$ node --version
v16.13.0

$ npm install --global yarn

$ yarn --version
1.22.17

Install dependencies

$ yarn

Test

  1. Compile contract
$ yarn compile
  1. Run tests
$ yarn test

Testnet deployment

  1. BSC Testnet
PRIVATE_KEY=<admin-private-key> yarn deploy:bsctest
  1. Create campaign for NFT721
PRIVATE_KEY=<manager-private-key> \
FACTORY721_ADDRESS=<factory-721-address> \
CAMPAIGN_ID=1 \
START_AT=1641543770 \
END_AT=1644135770 \
PAYMENT_TOKEN_ADDR=<erc20-address || address-zero>\
TOKEN_NAME=TESTTOKEN \
TOKEN_SYMBOL=TTK \
TOKEN_BASE_URI=<token-uri> \
  npx hardhat run --network testnet scripts/createCampaign721.ts
  1. Create campaign for NFT1155
PRIVATE_KEY=<manager-private-key> \
FACTORY721_ADDRESS=<factory-1155-address> \
CAMPAIGN_ID=2 \
START_AT=1641543770 \
END_AT=1644135770 \
PAYMENT_TOKEN_ADDR=<erc20-address || address-zero>\
TOKEN_BASE_URI=<token-uri> \
  npx hardhat run --network testnet scripts/createCampaign1155.ts

Upgrade factory contracts

  1. Clean cache and precompiled folders to avoid conflict errors
$ rm -rf artifacts cache .oppenzeppelin
  1. Put your folder .oppenzeppelin into root directory
  2. Update your smart contracts
  3. Run upgrade via ProxyAdmin contract
$ yarn upgrade:bsctest

OR

$ yarn upgrade:bscmain

For more information, you can check this link here

Solidity linter and prettiers

  1. Run linter to analyze convention and security for smart contracts
$ yarn sol:linter
  1. Format smart contracts
$ yarn sol:prettier
  1. Format typescript scripts for unit tests, deployment and upgrade
$ yarn ts:prettier
  • Note: Updated husky hook for pre-commit

About

Launchpad smart contracts for IDO and INO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published