- mint NFT - 大再
- 盲盒機制、白名單機制、兩階段發售、空投機制
- 戰鬥場
- Kyle
- 配對生育場
- 英宗
- 產蛋場
- Marco
- mint
- 喬瑟夫
- 戰鬥場
- 喬瑟夫
- 配對生育場
- 喬瑟夫
- 產蛋場
- 喬瑟夫
喬瑟夫
packages/vite-app-ts/ 前端專案
packages/hardhat-ts/ solidity 專案
- 先到 hardhat-ts 專案下,建立一個 .env 檔 放置以下資訊
REACT_APP_PROVIDER=96d856dd85f34d76a3c4ab39fccafe9a
ACCOUNT_PRIVATE_KEY= <錢包地址>
-
install your dependencies
yarn install or npm install
-
start a hardhat node
yarn chain or npm run chain
-
run the app,
open a new command prompt
# build hardhat & external contracts types yarn contracts:build or npm run contracts:build # deploy your hardhat contracts yarn deploy or npm run deploy # start vite yarn start or npm run start
- add to whitelist
function addToAllowList(address[] calldata addresses)
- check mint status
_isPreSaleActive, _isPublicSaleActive
- mint
function mint_presale(uint8 NUM_TOKENS_MINT), function mint_public(uint8 NUM_TOKENS_MINT)
- Etherscan合約地址Rookies.sol
- 節省mint gas fee,特別是針對批次mint
- 優化 1 - Removing duplicate storage from OpenZeppelin’s (OZ) ERC721Enumerable
- 優化 2 - updating the owner’s balance once per batch mint request, instead of per minted NFT
- 優化 3 - updating the owner data once per batch mint request, instead of per minted NFT
- 實作參考資料Azuki ERC721A
- 授權 NFT 到 質押合約
- 到
NFT
合約 執行function approve(<質押合約 地址>, tokenId)
- 到
- 質押 NFT 到 質押合約
- 到
質押
合約 執行function stakeNFT(_tokenID)
- 到
- 查看獎勵
- 到
質押
合約 執行getStakingReward(<錢包 地址>)
- 到
- 查看使用者
- 到
質押
合約 執行function getUser(<錢包 地址>)
- 到
- 贖回 NFT
- 到
質押
合約 執行function unstakeNFT(_stakeID)
- 查看使用者 就可以看到 _stakeID
- 到
This project is licensed under the MIT license.