-
Navigate to the smart contract directory:
cd smart-contract
-
Install dependencies:
yarn
-
Rename the contract:
yarn rename-contract {Custom Name}
-
Configure Collection Settings:
- Go to the
CollectionConfig
file in theconfig
folder. - Adjust the following settings as needed:
- Token Name
- Ticker
- Supply
- Hidden Metadata URI
- Mint Phases:
- Price
- Max mint per transaction (This is the max mint per wallet)
- Marketplace identifier
- Go to the
-
Update the whitelist:
- Edit the whitelist in
config/whitelist.json
. - Note: This should be the final whitelist before deploying the contract to the main net.
- Edit the whitelist in
-
Set up environment variables:
- Copy
env.example
to the actual.env
file. - Replace placeholders with real values:
- Collection URI (real revealed URI for the collection)
- CMC API Key (real API key)
- Block Explorer API Key (Etherscan API Key)
- Copy
-
Run Truffle dashboard:
- Open a new terminal and run:
truffle dashboard
-
Connect wallet:
- Connect your wallet to the Truffle dashboard, ensuring it is connected to the chain where you wish to deploy the contract.
-
Deploy the contract:
yarn deploy --network truffle
-
Confirm transaction:
- Confirm the transaction on the Truffle dashboard via deployer wallet.
-
Update contract address:
- Get the contract address from the terminal.
- Update the
CollectionConfig
file (line 29) with the real contract address.
-
Verify the contract:
yarn verify {CONTRACT_ADDRESS} --network truffle
-
Open whitelist sale:
yarn whitelist-open --network truffle
-
Close whitelist sale:
- Note: This must be done before starting a new phase.
yarn whitelist-close --network truffle
-
Open pre-sale:
yarn presale-open --network truffle
-
Open public sale:
- Note: The pre-sale does not need to close, as it is not a whitelist sale but rather just different price and max mint configurations. No need to waste gas closing the pre-sale.
yarn public-sale-open --network truffle
-
Close mint:
- Note: This will pause the contract and end the sale so no tokens can be minted. This should only be done after the collection is sold out or the mint has ended.
yarn public-sale-close --network truffle
-
Reveal NFTs:
- Note: This should only be done when the collection is minted out and the art is ready to be revealed.
yarn reveal --network truffle
-
Run withdraw function:
- This should be run from the deployer wallet directly from the contract via Etherscan.
Follow these steps carefully to ensure a smooth and successful deployment of the smart contract.