Sunday, August 10, 2025
No Result
View All Result
Crypeto News
Smarter_way_USA
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos
CRYPTO MARKETCAP
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos
CRYPTO MARKETCAP
Crypeto News
No Result
View All Result

NFT Metadata – Exploring Metadata for NFT Storage – Moralis Web3

by crypetonews
November 24, 2022
in Web3
Reading Time: 11 mins read
0 0
A A
0
Home Web3
Share on FacebookShare on Twitter


Metadata in NFT assets play a vital role as it contains details making NFT utility possible. That said, there are different aspects developers must consider when wanting to use the data. For example, when creating NFTs, you must use suitable NFT metadata storage solutions. Also, you need to go with the correct metadata format. Nonetheless, knowing what information you can find in metadata for NFT assets is also pretty important. 

In addition to properly understanding metadata in NFT assets, you also want to equip yourself with the best tools. This is where the ultimate NFT API makes all development endeavors feel like a breeze. The API provides powerful endpoints to fetch all sorts of on-chain data with short code snippets. Consequently, it’s the most important tool when building NFT dapps. Of course, the best NFT API also lets you fetch metadata NFT content. This means you can display NFT-representing files, incorporate NFT traits into NFT games, and much more. Furthermore, to help you answer the “what is NFT metadata?” question confidently, we’ll take a look at a metadata example in this article. As a result, you get to see some Moralis API endpoints in action. 

Moreover, we encourage you to take these endpoints for a test ride yourself. To do so, create your free Moralis account and follow our lead! However, before we roll up our sleeves, let’s explain the ins and outs of metadata in NFT assets and NFT metadata storage.

What is NFT Metadata?

Before answering “what is NFT metadata?”, let’s briefly look at NFTs and what they entail. NFTs are non-fungible crypto tokens, meaning that every NFT has a unique on-chain signature (token ID) and cannot be interchanged with other NFTs (unlike fungible tokens). This uniqueness makes NFTs perfect for representing unique digital or physical items. That said, it makes sense that digital art and digital collectibles are the most common NFT utility. However, NFTs have a huge potential beyond entertainment and speculative investing. By revolutionizing all sorts of certifications, membership/ownership proofing, online ticketing, and more, they can help create a more transparent and honest world.

A digital lion with arrows pointing at different body parts that contain individual metadata names.

On the other hand, metadata is, by definition, data about data. As such, metadata in NFT assets refers to specific pieces of information describing the NFT’s data. For instance, the above image points to different NFT traits categorized as the “attributes”. However, attributes are just one optional data type that can be stored in metadata for NFT assets. In fact, the exact metadata NFT includes varies depending on the NFT type. Though, there are several NFT standards set in place, such as ERC-721, ERC-1155, and SPL, which provide guidelines and rules. These rules define certain pieces of information that are essential in metadata and others that are optional. Hence, there is no exact format. However, an average metadata example includes a description, name, NFT-representing file destination (URL), and NFT attributes.           

A NFT metadata example on OpenSea, outlining the metadata in a graph.

NFTs and Smart Contracts

Behind every NFT or NFT collection, there is an NFT smart contract (as indicated in the above image). As you may know, smart contracts are pieces of on-chain software ensuring that predefined automated actions follow specific predefined rules when the right conditions are met. Accordingly, NFT smart contracts mint NFTs and regulate their transactions.

So, if you decide to mint your own NFTs, you need to write your own smart contract that follows the above-mentioned NFT standards and deploy it to the blockchain network of your choosing. Fortunately, there are verified NFT smart contract templates provided by open-source platforms, such as OpenZeppelin (EVM) or Metaplex (Solana). As such, you do not need to master Solidity or Rust to start minting NFTs in a decentralized manner. Of course, you do need to understand metadata storage. After all, providing a link to your metadata in a smart contract is vital. Hence, let’s focus on the metadata NFT storage aspect.   

How is NFT Metadata Stored?

The sequence of how metadata in NFT assets are stored.

As seen in the above image, the data is stored, for example, on IPFS. Furthermore, just by looking at the above image, you immediately understand more than most NFT fanatics. You see, most users think that NFT-representing files are stored on the blockchain. However, that is not the case. After all, the NFT-representing files are too large, and keeping them on-chain would have catastrophic technical and economic consequences. Hence, NFT devs need to store those files elsewhere, ideally using a decentralized storage solution. 

While metadata files are usually smaller than NFT-representing files, they would consume unnecessary valuable blockchain space. Thus, metadata NFT info is also not stored on the chain. Instead, NFT devs must store metadata files elsewhere and provide the link (URI) to the related NFT smart contract. Just like with NFT-representing files, devs have various storage options. Ideally, all devs should focus on using decentralized NFT metadata storage solutions. That said, before they can store the data properly, devs need to use a suitable format.     

File formats, including PNG, SVG, and JSON.

NFT Metadata Format Alternatives

When it comes to the metadata format, you need to be aware of two factors. On the one hand, you need to know which NFT standard you are following to include the right pieces of information. On the other hand, you need to know what file format you will use. The latter will determine how to structure the details.

As you may know, there are several file formats used when it comes to metadata in general. However, the most common three alternatives are XML, TVS, and JSON file formats. Nonetheless, when it comes to metadata format, JSON is king. As such, let’s take a closer look at NFT JSON metadata.

NFT JSON Metadata

Code snippet showing metadata.

In the image above, you can see an example NFT JSON metadata format. Moreover, the above example structure complies with the ERC-721 standard. As such, it includes the “name”, “description”, “image”, and “external_url” key-value pairs. Also, the “attributes” key contains “trait_type” and “value” sub-key, sub-value pairs. Furthermore, below is an actual NFT metadata example:  

Nonetheless, the following are some of the main advantages that made the NFT JSON metadata format the norm in the crypto realm:

Speed – JSON is quite fast as it consumes minimal memory space.Simplicity – A JSON API offers a high-level facade, simplifying commonly utilized use cases.‬ ‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬Open-Source – The JSON library is open-source and free to use for everyone.Universal Support – Supports all browsers.Neat and Compatible – Creates clean and compatible JSON results that are easy to read.The JSON library does not require any other library for processing.

Now that you know that metadata NFT details typically come in the form of JSON files, it’s time to take a closer look at some popular storage solutions.

Person looking at a monitor that shows two storage solutions.

NFT Metadata Storage Solutions

So, let’s say you have your NFT-representing files ready. By now, you know you need to link these files to your metadata NFT details. As such, before you actually create and store your NFT JSON metadata file, you need to store your NFT-representing files properly. As mentioned above, ideally, you’d choose a decentralized storage solution. Fortunately, there are some reliable solutions at your disposal. However, in our opinion, InterPlanetary File System (IPFS) stands out from the crowd. If you are hearing about this storage solution for the first time, make sure to read our “IPFS NFT” article. Moreover, the following are some other reputable decentralized storage solutions that deserve your consideration:

Crust NetworkHoloSiaFilecoinBitTorrentStorjArweave

What’s next? Well, you can save your NFT-representing file to IPFS and obtain its URL (see the image displayed earlier). Then you can paste that URL into your NFT JSON metadata file alongside other details. Next, you can save that metadata file to IPFS as well and obtain its URI. Finally, to mint your NFT, you’ll need to paste that URI into your NFT smart contract that matches an NFT standard you’ve decided to focus on. 

Of course, you can do all of that manually. However, thanks to Moralis’ IPFS integration, you can use the Moralis IPFS API to create and upload metadata or NFT-representing files using some simple lines of code. We’ll show you how to do that by uploading a metadata example.    

Wizard pointing at Moralis logo.

Exploring an NFT Metadata Example

We invite you to further solidify your metadata knowledge by completing the following example tutorial yourself. Fortunately, it only takes three simple steps to see the power of storing metadata in NFT to IPFS with Moralis. However, before you take on the upcoming steps, make sure you’ve completed the following prerequisites:

Install Python or Node v.14 (or higher).Get your favorite code editor or IDE ready. We tend to use Visual Studio Code (VSC).Install your favorite package manager (“npm”, “yarn”, “pnpm”, or “pip”).

Step 1: Setting Up Moralis

If you don’t have your Moralis account up and running yet, create it now. This will give you access to your admin area, where you’ll be able to obtain your Web3 API key:

Step 1, click on Web3 APIs. Step 2, copy the Web3 API key.

For now, hold on to your API key, and focus on installing the Moralis SDK for your project. Hence, run the command line that matches your package manager:

npm install moralisyarn add moralispnpm add moralispip install moralis

Step 2: Using the Right Lines of Code

To make things as straightforward for you as possible, you do not need to write the code yourself. Instead, you can simply copy-paste the following “index.js” example file:

const Moralis = require(‘moralis’).default;
const { EvmChain } = require(‘@moralisweb3/evm-utils’);

const runApp = async () => {
await Moralis.start({
apiKey: “YOUR_API_KEY”,
// …and any other configuration
});

const abi = [
{
path: “metadata.json”,
content: {
name: “NFT Name”,
description: “This will be the NFT description.”,
image: “ipfs://bafybeihewi4brhhmjqvquwdqnlzhnamfh26txwmw2fe4nfswfckpthowna/brandResoursesMage2.svg”,
attributes: [
{
“trait_type”: “Base”,
value: “Starfish”
},
{
“trait_type”: “Eyes”,
value: “Big”
},
{
“trait_type”: “Mouth”,
value: “Surprised”
},
},
},
];

const response = await Moralis.EvmApi.ipfs.uploadFolder({ abi });

console.log(response.toJSON());
}

runApp();

Looking at the above lines of code, you can see the “uploadFolder” IPFS API endpoint. The latter does the heavy lifting of uploading metadata for NFT assets. Furthermore, you can also see our example “abi” constant, which includes all the metadata NFT details of our example NFT. Also, note that we’ve already uploaded our example NFT-representing SVG image. Actually, you can view it using a browser that supports IPFS addresses:

Inputting the IPFS IRL into a URL bar to see the actual file of the NFT metadata.

Nonetheless, make sure not to forget to replace “YOUR_API_KEY” with the above-obtained Web3 API key.

Note: The above example script is in JavaScript. However, if you prefer TypeScript or Python, visit the documentation page to upload NFT metadata to IPFS and copy the content of “index.ts” or “index.py” instead:

Index.js file inside VSC.

Step 3: Executing the Code

With the above lines of code in place, it’s time to execute the program. Hence, enter the following command in your terminal:

node index.js

Note: If you are using TypeScript or Python, you will need to use the “npx ts-node index.ts” or “python index.py” commands instead.

After running the above command, use your terminal to explore the results. We also encourage you to copy the path it returns and use an IPFS-compatible browser, such as Brave, to view your NFT’s metadata. 

The Get NFT Metadata documentation page from Moralis.

Fetching Metadata in NFT Projects

Whether you want to fetch metadata from your project’s NFTs or other existing NFTs, you can use the power of the ultimate NFT API. When it comes to fetching non-fungible tokens’ metadata, the following three endpoints tend to be most valuable:

Make sure to explore the above endpoints’ documentation pages to learn how to use them properly. 

NFT Metadata – Exploring Metadata for NFT Storage – Summary

We covered quite a distance in today’s article. For starters, you had an opportunity to learn how to properly answer the “what is NFT metadata?” question. As such, you discovered what NFTs are and that their unique on-chain data make them valuable. We also explained how smart contracts fit into the NFT story. Next, you discovered that the metadata is not actually stored on the blockchain. Instead, it is typically stored inside NFT JSON metadata files. Then, we use storage solutions, such as IPFS, to host those files. Finally, you were able to follow our lead and create and upload an NFT metadata example.   

If you are serious about NFT development, you have two options. You can explore further how to create your own NFTs. This will require dealing with smart contracts and also uploading NFT-representing files and metadata files to IPFS or other decentralized storage solutions. Of course, with the help of detailed instructions you can find on the Moralis blog, you’ll be able to do that without breaking a sweat.

Of course, you might also prefer to explore other blockchain development topics. Aside from our crypto blog, the Moralis YouTube channel will help you with that. After all, these two outlets cover a wide range of topics. For instance, some of the latest articles explain how AWS Lambda works, what GameSparks is, how to get NFT collection data, and much more. 

Last but not least, you may also be eager to go full-time crypto as soon as possible. If so, you should enroll in Moralis Academy to become blockchain certified, and we recommend starting with blockchain and Bitcoin fundamentals.   



Source link

Tags: exploringMetadataMoralisNFTStorageWeb3
Previous Post

Crypto has survived worse than the fall of FTX: Chainalysis

Next Post

Amazon Beats Apple For Rights To Produce Series About FTX

Related Posts

Ronin API – Build on Ronin with Moralis
Web3

Ronin API – Build on Ronin with Moralis

May 28, 2025
How to Build NFT Apps on Solana
Web3

How to Build NFT Apps on Solana

May 23, 2025
Solana NFT API – Exploring the Top 2025 NFT API for Solana
Web3

Solana NFT API – Exploring the Top 2025 NFT API for Solana

May 21, 2025
Get Solana Whales – How to Fetch Top Whales of a Solana Token
Web3

Get Solana Whales – How to Fetch Top Whales of a Solana Token

May 19, 2025
Neobank App Development – How to Build a Web3 Neobank
Web3

Neobank App Development – How to Build a Web3 Neobank

May 16, 2025
How to Get Top Solana Token Holders
Web3

How to Get Top Solana Token Holders

May 14, 2025
Next Post
Amazon Beats Apple For Rights To Produce Series About FTX

Amazon Beats Apple For Rights To Produce Series About FTX

Polygon Bearish Signal: Whale Moves .8M in MATIC To Binance

Polygon Bearish Signal: Whale Moves $7.8M in MATIC To Binance

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

RECOMMENDED

Solana Price Jumps as Seeker Phones Ship Globally: Is This the Catalyst for a SOL Bull Run?
Bitcoin

Solana Price Jumps as Seeker Phones Ship Globally: Is This the Catalyst for a SOL Bull Run?

by crypetonews
August 5, 2025
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure Solana Mobile has officially begun global shipments...

UK-based Union Jack Oil turns to Bitcoin mining amid rising network difficulty

UK-based Union Jack Oil turns to Bitcoin mining amid rising network difficulty

August 7, 2025
Goldman Sachs Data Shows AI’s Unemployment Impact

Goldman Sachs Data Shows AI’s Unemployment Impact

August 5, 2025
Fake Ethereum trading bots on YouTube help scammers steal over 0K

Fake Ethereum trading bots on YouTube help scammers steal over $900K

August 7, 2025
Whale Buys 300 Bitcoins Daily Despite Market Crash

Whale Buys 300 Bitcoins Daily Despite Market Crash

August 3, 2025
NVIDIA vGPU 19.0 Elevates AI and Graphics Virtualization on Blackwell GPUs

NVIDIA vGPU 19.0 Elevates AI and Graphics Virtualization on Blackwell GPUs

August 6, 2025

Please enter CoinGecko Free Api Key to get this plugin works.
  • Trending
  • Comments
  • Latest
Top 10 NFTs to Watch in 2025 for High-Return Investments

Top 10 NFTs to Watch in 2025 for High-Return Investments

November 22, 2024
Uniswap v4 Teases Major Updates for 2025

Uniswap v4 Teases Major Updates for 2025

January 2, 2025
Enforceable Human-Readable Transactions: Can They Prevent Bybit-Style Hacks?

Enforceable Human-Readable Transactions: Can They Prevent Bybit-Style Hacks?

February 27, 2025
Best Cryptocurrency Portfolio Tracker Apps to Use in 2025

Best Cryptocurrency Portfolio Tracker Apps to Use in 2025

April 24, 2025
What’s the Difference Between Polygon PoS vs Polygon zkEVM?

What’s the Difference Between Polygon PoS vs Polygon zkEVM?

November 20, 2023
FTT jumps 7% as Backpack launches platform to help FTX victims liquidate claims

FTT jumps 7% as Backpack launches platform to help FTX victims liquidate claims

July 18, 2025
XRP Official CRYPTO VOTE LIVE NEWS!🔴GENIUS, CLARITY Act

XRP Official CRYPTO VOTE LIVE NEWS!🔴GENIUS, CLARITY Act

46
IMP UPDATE : BILLS PASSED || BITCOIN DOMINANCE FALLING

IMP UPDATE : BILLS PASSED || BITCOIN DOMINANCE FALLING

38
🚨BIG UPDATE ON WAZIRX || ALT COIN PORTFOLIO NO 1

🚨BIG UPDATE ON WAZIRX || ALT COIN PORTFOLIO NO 1

37
BITCOIN: IT'S HAPPENING NOW (Urgent Update)!!! Bitcoin News Today, Ethereum, Solana, XRP & Chainlink

BITCOIN: IT'S HAPPENING NOW (Urgent Update)!!! Bitcoin News Today, Ethereum, Solana, XRP & Chainlink

33
JUST IN XRP RIPPLE DUBAI NEWS!

JUST IN XRP RIPPLE DUBAI NEWS!

25
Flash USDT | How It Became the Biggest Crypto Scam Worldwide

Flash USDT | How It Became the Biggest Crypto Scam Worldwide

31
XRP and Ripple Shares Anchor Vivopower’s Breakthrough Dual-Asset Strategy

XRP and Ripple Shares Anchor Vivopower’s Breakthrough Dual-Asset Strategy

August 10, 2025
ETH Rally Wipes Out 3M in Shorts—Eric Trump Says it Puts a ‘Smile on My Face’

ETH Rally Wipes Out $173M in Shorts—Eric Trump Says it Puts a ‘Smile on My Face’

August 9, 2025
BlackRock Confirms No Current XRP Or Solana Spot ETF Filings

BlackRock Confirms No Current XRP Or Solana Spot ETF Filings

August 9, 2025
Custodia Bank founder Caitlin Long dives into Trump’s debanking executive order

Custodia Bank founder Caitlin Long dives into Trump’s debanking executive order

August 9, 2025
Power and Portability Meet In This Near-Mint 13″ MacBook Pro

Power and Portability Meet In This Near-Mint 13″ MacBook Pro

August 9, 2025
Will ADA Reach  or ?

Will ADA Reach $10 or $50?

August 9, 2025
Crypeto News

Find the latest Bitcoin, Ethereum, blockchain, crypto, Business, Fintech News, interviews, and price analysis at Crypeto News.

CATEGORIES

  • Altcoin
  • Analysis
  • Bitcoin
  • Blockchain
  • Crypto Exchanges
  • Crypto Updates
  • DeFi
  • Ethereum
  • Metaverse
  • Mining
  • NFT
  • Regulations
  • Scam Alert
  • Uncategorized
  • Videos
  • Web3

LATEST UPDATES

  • XRP and Ripple Shares Anchor Vivopower’s Breakthrough Dual-Asset Strategy
  • ETH Rally Wipes Out $173M in Shorts—Eric Trump Says it Puts a ‘Smile on My Face’
  • BlackRock Confirms No Current XRP Or Solana Spot ETF Filings
  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2022 Crypeto News.
Crypeto News is not responsible for the content of external sites.

No Result
View All Result
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos

Copyright © 2022 Crypeto News.
Crypeto News is not responsible for the content of external sites.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In