IpastorSan / erc721-nft-foundry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Road to Web3. Week 1. Create and deploy an NFT

Intro

This project is part of the Road to Web3 by the Alchemy team.

During week 1, you get an intro on NFTs, build one using Openzeppelin´s wizard, deploy them on Rinkeby using Remix and uploading the metadata to Filebase

To see the course you can either head over to Alchemy´s Youtube Channel or see the Blog version

Deployment address (Rinkeby) = 0xf91c1bfb2dbacbfbd39a171ef0cd3e3b47893099

Deployment Address (Goerli) = 0x106eee8ba91043946c183cf87409f895e5083450

This project

This project follows the course original code (directly taken from OZ´s Wizard) but within a Foundry project. Basically just using this as an excuse to learn how to use Foundry.

You will find some tests and deployment scripts.

Instructions.

git clone https://github.com/IpastorSan/RoadToWeb3-week1-nft.git
cd RoadToWeb3-week1-nft
forge install
  1. Compile the project
forge build
  1. Run test suite
forge test

See the Book of Foundry to learn more

Run Locally

Open Anvil local node

anvil

Load .env variables in .env file->NO spaces between variable name and value, value with quotes. PRIVATE_KEY="blablabla"

source .env

Run on local node

forge script script/nftDeploy.s.sol:NftDeploy --fork-url http://localhost:8545  --private-key $PRIVATE_KEY0 --broadcast 

Deploy to Goerli

Load .env variables in .env file->NO spaces between variable name and value, value with quotes. PRIVATE_KEY="blablabla"

source .env

Deploy to Goerli and verify

forge script script/nftDeploy.s.sol:NftDeploy --rpc-url $GOERLI_RPC_URL  --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_KEY -vvvv

About


Languages

Language:Solidity 100.0%