Scaffold Details | |
---|---|
Complexity | Advanced |
Automated Tests | No |
Installed Plugins | LIGO, Taquito, Flextesa, Contract Types, IPFS-Pinata |
Frontend Dapp | Yes |
Wallet Integration | Yes |
Repository | https://github.com/ecadlabs/taqueria-scaffold-nft |
In a rush? You can follow the steps below to get up and running immediately:
taq scaffold https://github.com/ecadlabs/taqueria-scaffold-nft nft-scaffold
cd nft-scaffold
npm run setup
cd taqueria
touch .env
- Get your Pinata JWT token from your Pinata account
Please note that the JWT key is only displayed once when you add a new key. If you have saved a JWS access token, you can use that, but if not, you will have to add a new key and copy the JWT from that.
- Insert the JWT from Pinata into the .env file
echo "pinataJwtToken=eyJhbGc..." >> .env
cd ..
npm run start:taqueria:local
npm run apply
npm run start:app
The NFT scaffold provides a minimal contract and React dApp for publishing and viewing unique NFTs. This would be a good beginning point for an artist who wants to sell unique artpieces on their own website.
- Taqueria v0.22.2 or later
- Docker v20.10.12 or later
- Node.js v16.17.1 or later
- Temple Wallet (can be found here)
- A funded testnet account (instructions here)
To add artwork and minting its token:
- Add the artwork asset file (image, video, etc) to the assets directory
/taqueria/assets
- Make sure to name the asset file with the next token id:
- i.e.
0042.jpg
- Add a thumbnail image for the NFT to the same assets directory
- use the filename with the same token id with
.thumb
- the thumbnail image does not need to be the same file type as the main asset
- i.e.
0042.thumb.png
- use the filename with the same token id with
- Publish the artwork asset to IPFS and mint the NFT to the contract by running the provisioner
npm run apply
- Run the dApp and the new NFT should now be visible in the NFT List
This project is available as a Taqueria scaffold. To create a new project from this scaffold, run the following command:
taq scaffold https://github.com/ecadlabs/taqueria-scaffold-nft nft-scaffold
This will clone the NFT scaffold project into a directory called nft-scaffold
- Change into the
/taqueria
directory inside the newly created project directory:
cd nft-scaffold/taqueria
- Create the file
.env
inside the/taqueria
directory
touch .env
-
Get your Pinata JWT token from your Pinata account
-
Add the token to the
.env
file you created:
echo "pinataJwtToken=eyJhbGc..." >> .env
- Go up a directory to start the local Taqueria project
cd ..
- Start the Taqueria project by running the start script:
npm run start:taqueria:local
- Apply the Provisions
npm run apply
- Start the dApp:
npm run start:app
Use the dApp (served in your browser at http://localhost:3000) by connecting a wallet and using the web UI
-
app
- Minimal create React app
- Call contract methods
- Access contract storage
-
taqueria
- Everything related to the contract
taqueria/.taq
- Taqueria config folder, including setup for all required plugins
taqueria/contracts
- The contract .ligo code
taqueria/artifacts
- The compiled contract (*.tz file)
taqueria/types
- The contract typescript typing
taqueria/assets
- The NFT assets to upload
The React dApp allows browsing the NFTs that have been minted to the contract. This is a minimal React project and needs to be extended to support marketplace features like selling or browsing owned NFTs.
Change into the /app
directory:
cd app
Build the React dApp:
npm run build
Start and serve the dApp:
npm run start
You should now be able to access the NFT scaffold dApp at http://localhost:3000
Open a browser and navigate to http://localhost:3000
Click on the Connect wallet
button in the top right corner of the page and select Temple Wallet
Provide your credentials for the wallet, select a funded account, and click connect