The Metaforge and writing NFTs
Following the NFT (non-fungible tokens) craze I decided to understand how the ERC-721 specification worked and was integrated in websites such as OpenSea.
This post is a follow-up on my other post on the blockchain and ERC-20 tokens.
There are a few NFT specifications but ERC-721 https://eips.ethereum.org/EIPS/eip-721 is the most common one. It is supported by https://opensea.io and most other NFT platforms.
Non-Fungible Tokens (NFTs)
NFTs are unique digital assets that represent ownership or proof of authenticity for a specific item, often using blockchain technology. Unlike fungible tokens, each NFT is distinct and cannot be replaced or exchanged on a one-to-one basis. NFTs have gained prominence in various industries, including art, gaming, and entertainment, providing a verifiable and transparent way to represent ownership and provenance in the digital realm.
NFT Generation
A friend wrote a Python generator for weapon images. We used those images for an ERC-721 collection.
ERC-721 Smart Contracts and OpenZeppelin
I Implemented Ethereum Request for Comments 721 (ERC-721) smart contracts, utilizing the widely adopted OpenZeppelin standards through Truffle and Solidity. ERC-721 provides a blueprint for creating non-fungible tokens on the Ethereum blockchain, ensuring each token's uniqueness and indivisibility, crucial for representing one-of-a-kind weapons in the NFT ecosystem.
OpenZeppelin smart contracts are fully tested and validated smart contracts that can be used and extended with new features.
Web3 Website
I made a Web3 website where users could connect MetaMask and mint tokens.
Minting Process
Users can actively participate in the project by minting new NFTs through the website. The minting process involves the generation and creation of fresh ERC-721 tokens, each representing a distinct weapon. This process not only engages users but also contributes to the expansion and diversity of the overall NFT collection.
Opensea Integration
The minted weapons could also be viewed on OpenSea.
Metadata on IPFS
To ensure the decentralization and accessibility of NFT metadata by storing it on the InterPlanetary File System (IPFS). IPFS provides a distributed and resilient storage solution, guaranteeing that the metadata associated with each weapon NFT remains available and tamper-proof, fostering transparency and reliability.
Pinata Hosting
I used Pinata to host content on IPFS, enhancing the reliability and accessibility of the project's metadata. Pinata serves as a convenient and dependable infrastructure, ensuring that the IPFS-based data, including weapon attributes and details, is efficiently stored and served to users. As IPFS is a decentralised network, we need to ensure that at least a few nodes will host the data. It is very similar to torrents, if no peer in the network stores the data, it can be lost forever.

The metaforge website