https://docs.openzeppelin.com/contracts/4.x/wizard
-
Select ERC721
-
Change Name and Symbol
-
Edit Base URI - for your tokens
-
Features
- Mintable + Auto Increment Ids
- Pauseable
- Enumerable
- Divide the code up into sections using comments
-
- Property Variables
-
- Lifecycle Methods
-
- Pauseable Functions
-
- Minting Functions
-
- Other Functions
-
- Remove
onlyOwner
modifier fromsafeMint
- Add in
MINT_PRICE
in ether. Add correspondingrequire
statement in `safeMint() - Add
MAX_SUPPLY
for total number of tokens. Add correspondingrequire
statement insafeMint()
- In the constructor, call
_tokenIdCounter.increment()
to start the token at 1 - Add in
withdraw()
function
-
Check compiler version at the type of the Solidity File:
pragma solidity ^0.8.4;
-
Select the compiler from the left hand side of the page and select the corresponding compiler version - 0.8.4 or whatever the newest version is out.
-
Compile the contract
-
Select the
Deploy & Run Transactions
tab. Environment: JavaScript VM Account: Make note of what account you deploy it on Contract: SelectYourContract.sol
from the bottom of the dropdown list. -
View the deployed contract and examine transactions.
Follow along with this tutorial: