Simple ERC-1155 NFT

Branch Info

Author: Pablo Ruiz Source code: https://github.com/scaffold-eth/scaffold-eth-examples/tree/simple-erc1155-example Intended audience: Beginners/Intermediate Topics: Scaffold-eth basics, NFTs, IPFS, ERC-1155


This sample shows how to create a very simple ERC-1155 token, using OpenZeppelin.

๐Ÿƒโ€โ™€๏ธ Quick Start

Required: Node plus Yarn and Gitโ€‹
git clone https://github.com/scaffold-eth/scaffold-eth-examples.git simple-erc1155-nft-example
cd simple-erc1155-nft-example
git checkout simple-erc1155-nft-example
yarn install
yarn start
in a second terminal window:
cd simple-erc1155-nft-example
yarn chain
in a third terminal window:
cd simple-erc1155-nft-example
yarn deploy
In the deployment script (/packages/hardhat/deploy/00_deploy_your_contract.js), you will notice we are uploading the erc1155metadata folder (in /packages/hardhat/erc1155metadata) so we store the CID for the contract URI:
๐Ÿ“ฑ Open http://localhost:3000 to see the app
โœ๏ธ Edit the mint script mint.js in packages/hardhat/scripts and update the toAddress to your frontend address (wallet address in the top right or localhost:3000).
in a terminal window run the mint script:
yarn mint
๐Ÿ‘€ You should see your collectibles show up if you minted to the correct address:
๐Ÿ‘› Open an incognito window and navigate to http://localhost:3000 (You'll notice it has a new wallet address).โ›ฝ๏ธ Grab some gas for each account using the faucet:
๐ŸŽŸ Send an NFT to the incognito window address:
Edit your deployment script deploy.js in packages/hardhat/scripts
๐Ÿ” Edit your smart contract YourCollectible.sol in packages/hardhat/contracts
๐Ÿ“ Edit your frontend App.jsx in packages/react-app/src
๐Ÿ”‘ Create wallet links to your app with yarn wallet and yarn fundedwallet
โฌ‡๏ธ Installing a new package to your frontend? You need to cd packages/react-app and then yarn add PACKAGE
Copy link
On this page
Branch Info
๐Ÿƒโ€โ™€๏ธ Quick Start