upgradeable ERC721 contract for LOWB
We follow this guide to set up the initial project.
-
Before running this project, install truffle first:
npm install -g truffle
. -
Run
npm install
to install required modules. -
Compile the smart contracts:
truffle compile
. -
Deploy to local network:
truffle migrate
. (You may need to start Ganache before migrating.) -
Now you can start to play with this contract:
truffle console
. For example, you can add a new serial by:truffle(development)> let nft = await MyCollectible.deployed() truffle(development)> let accounts = await web3.eth.getAccounts() truffle(development)> nft.addSerial(667, 667)
-
You can publish loser punk groups using script:
truffle exec publish.js
. (ChangeN
andfee
first.)
- Create a new .secret file in root directory and enter your 12 word mnemonic seed phrase. Then just run
truffle migrate --network testnet
. You will deploy contracts to the Binance testnet. - To verify the contract, create a new .apikey file in root directory and enter the API Key. Then just run
truffle run verify MyCollectible@{contract-address} --network testnet
.