Skip to content

Creating and deploying an ERC-721 smart contract on the Goerli test network | Solidity - Hardhat - Alchemy - Metamask - Pinata

Notifications You must be signed in to change notification settings

muhammedkurtulus/ethereum-erc721-nft-create

Repository files navigation

Solidity - Hardhat - Alchemy - Metamask - Pinata

Creating and deploying an ERC-721 smart contract on the Goerli test network.

Getting Started

  • Clone the repository, moving into the folder with cd, install dependencies npm install

  • Create an app on Alchemy and generate API key

  • Add ether from a faucet : Goerli Faucet or here or others..

  • Configure the metadata for your nft using IPFS with Pinata or use the ready ones in the project

    • Upload your image to Pinata and copy CID
    • Add to nft-metadata.json and change other data.
    • Once you’re done editing the JSON file, save it and upload it to Pinata.
    • Copy CID and change mintNFT("ipfs://your CID")" in mint-nft.js

Deployment

  • Create .env like this :

    API_URL = "alchemy api https url"
    PRIVATE_KEY = "metamask private key"
    PUBLIC_KEY = "metamask public key"
    
  • Compile the smart contract npx hardhat compile

  • Deploy the smart contract npx hardhat --network goerli run scripts/deploy.js

    • Go to the Goerli etherscan for check.
    • Copy contract adress from Goerli etherscan or console.
    • Change const contractAddress = "your contract adress" in mint-nft.js
  • Mint the NFT node scripts/mint-nft.js and check Goerli etherscan

View NFT

  • For view your NFT in your wallet:

    • Get metamask mobile app
    • Select Goerli Test Network as your network.
    • Import your NFT: Address: contract adress and ID: 1 (collectible ID)

About

Creating and deploying an ERC-721 smart contract on the Goerli test network | Solidity - Hardhat - Alchemy - Metamask - Pinata

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published