How to deploy an NFT on Ethereum/EVM
A guide on deploying an NFT, including the smart contract and creation of the contract on the blockchain guide
Table of Contents for How to deploy an NFT on Ethereum/EVM
This is a guide to deploying an NFT (or any other smart contract) on Ethereum.
The easiest way is to deploy it using Remix. There are a few steps:
Create an ERC271 NFT smart contract
You can use the wizard on OpenZeppelin to automatically create an ERC721 smart contract.
Visit it here: https://docs.openzeppelin.com/contracts/4.x/wizard
Select the “ERC721” tab (or “ERC1155”) and customise your options.
Once everything is set up, click the “Open in Remix” button. This will open a new tab with https://remix.ethereum.org loaded up with your generated NFT.
Install Metamask, and get some testnet eth
Install the Metamask Chrome extension
Then go into Metamask settings, enable testnet, and change your network to Goerli.
Now you need to get some testnet eth. Go to our page about ethereum testnets and go to one of the faucet links for Goerli, and send some to your address.
Now back in Remix go to the sidebar and go to the compile tab. Make sure it compiles ok (you will have to change the compiler version to match the version at the top of each file (e.g. 0.8.4)
Then go to the ‘deploy’ tab, and change the environment as Injected Web3.
Confirm it in the metamask popup, then click deploy. You will then have to confirm (note: this will cost testnet eth - make sure you have selected the testnet). After 10-20 secs it will be deployed. You can look at the output in the console pane in Remix, or on the left under ‘deployed contracts’ to see the address & interact with it.
Spotted a typo or have a suggestion to make this crypto dev article better? Please let me know!
📙 Solidity Auditing online quiz
Learn how to audit smart contracts by looking at some example code and trying to find the bugs
⛽ Solidity Gas Optimizations Guide
How to optimize and reduce gas usage in your smart contracts in Solidity
🧪 Guide to testing with Foundry
Guide to adding testing for your Solidity contracts, using the Foundry and Forge tools
📌 Guide to UTXO
UTXO and the UTXO set (used by blockchains such as Bitcoin) explained
📐 Solidity Assembly Guide
Introduction guide to using assembly in your Solidity smart contracts
📦 Ethereum EOF format explained
Information explaining what the upcoming Ethereum EOF format is all about