文档 Docs
上线 BNB
Same contract, same site. Point the deploy at BNB testnet for free, or mainnet when you fund a wallet.
The pipeline
generate300 sprites + metadata
→
host artpublic host or IPFS
→
deployhardhat to BNB
→
site followsreads new address
BNB testnet
Get free test BNB from the faucet, put your key and the base URI in an env file, and deploy. The site reads the new address from deployment.json automatically, so the mint page just works.
# free test BNB: https://testnet.bnbchain.org/faucet-smart
$ export PRIVATE_KEY=0xyourtestkey
$ export NFT_BASE_URI=https://your-host/nft/metadata/
$ npx hardhat run scripts/deploy.cjs --network bscTestnet
BNB mainnet
Mainnet spends real BNB and needs a funded wallet. The command is the only thing that changes.
$ npx hardhat run scripts/deploy.cjs --network bsc
# opBNB is even cheaper if you want an L2
$ npx hardhat run scripts/deploy.cjs --network opbnbTestnet
Environment
| Variable | Purpose |
|---|---|
PRIVATE_KEY | deployer wallet key |
NFT_BASE_URI | where metadata is hosted |
MINT_PRICE | price in BNB, default 0.0034 |
BSCSCAN_API_KEY | optional, for verification |