Launpad smart contracts support IDO (Initial Dex Offering for ERC20) and INO (Initial NFT Offering for ERC721 and ERC1155).
- Support contract upgradeable
- Solidity 0.8.x
- Governance
- Lazy-minting for ERC721 and ERC1155
- Contract factory for INO
Node >= 10.x && yarn > 1.x
$ node --version
v16.13.0
$ npm install --global yarn
$ yarn --version
1.22.17
Install dependencies
$ yarn
- Compile contract
$ yarn compile
- Run tests
$ yarn test
- BSC Testnet
PRIVATE_KEY=<admin-private-key> yarn deploy:bsctest
- 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
- 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
- Clean cache and precompiled folders to avoid conflict errors
$ rm -rf artifacts cache .oppenzeppelin
- Put your folder
.oppenzeppelin
into root directory - Update your smart contracts
- Run upgrade via
ProxyAdmin
contract
$ yarn upgrade:bsctest
OR
$ yarn upgrade:bscmain
For more information, you can check this link here
- Run linter to analyze convention and security for smart contracts
$ yarn sol:linter
- Format smart contracts
$ yarn sol:prettier
- Format typescript scripts for unit tests, deployment and upgrade
$ yarn ts:prettier
- Note: Updated husky hook for pre-commit