• Discover
  • Partner with us
  • Chapters
  • Blog

Learn everything about Chiliz

Introduction
Chiliz Network and Its Use Cases
What Are Test Tokens and How to Utilize Them

What Are We Going to Build
Which Technologies Will Be Used
Implementing Frontend I - Creating ENV
Implementing Frontend II - Connect Wallet
Implementing Frontend III - Getting Token Balances
Implementing Frontend IV - Getting Token Metadata
Implementing Frontend V - HTML/CSS Walkthrough
Homework I - Submit your github repository link

What Are We Going to Build
Getting Chiliz Testnet Coins
Deploying NFT Marketplace Using Thirdweb
Implementing Frontend I - Creating ENV
Implementing Frontend II - Fetching Contract Info
Implementing Frontend III - Interacting with NFT Collection
Implementing Frontend IV - Interacting with Marketplace
Implementing Frontend V - List/Delist NFT on Marketplace
Implementing Frontend VI - Buy Listing
Homework II - Submit your github repository link

Submit Your Final Project

Using Hooks to Display Token Data from Moralis

In this video, we review how to use the custom hooks we've built to interact with Moralis and display relevant token data. The focus here is on functionality, so we’ll briefly touch on HTML/CSS but won’t go into detail.

1. Index Page Overview

The index page is the entry point of the application. It includes a "Connect Wallet" button that uses our useAuthentication hook.

  • When clicked, it triggers handleConnect.
  • If the wallet is not connected, only the connect button is shown.
  • Once connected, the user can navigate to:
  • Balances
  • Mint (Meet)
  • Fun Tokens

2. Balances Page

On the Balances page:

  • We use a TokenCard component to display individual token data such as:
  • Symbol
  • Balance
  • Address
  • Logo

Token data is fetched through our useBalances hook, which returns:

  • tokenBalances
  • message (in case of errors)

A loading message is shown until data is available. Once fetched, each token is rendered with a card, and the native token balance is displayed as plain text.

3. Meet (Mint) Page

The Meet page acts as a simple token-gated area. We check if the user’s native token balance is a number greater than zero:

  • If eligible, a countdown is shown as placeholder content.
  • If not, access is restricted.

This can later be extended to include actual gated features such as video access or exclusive content.

4. Fun Tokens Page

In the Fun Tokens section, we use the useTokenMetadata hook to fetch metadata for all available tokens.

Each token is displayed with:

  • Symbol, address, decimals
  • Logo
  • Boolean flags like possibleScam, verifiedCollection
  • Created date (formatted properly)

This is a more detailed version of the TokenCard used in the Balances section, handling cases where data might be null or malformed.

5. App Component and Context Integration

In the App component:

  • We wrap everything with the Wagmi Config and Context Provider to ensure all components have access to shared wallet and blockchain state.
  • Without this setup, hooks like useAddress or useBalances wouldn't work as expected.

This global context is essential for maintaining a seamless user experience across pages.

Summary

This video demonstrated how to:

  • Use custom hooks to fetch and display token data.
  • Apply token gating to restrict access based on user balance.
  • Handle real-time UI updates using React state and Wagmi integration.
  • Organize logic cleanly across multiple pages.
Previous
Next

Lesson discussion

Swap insights and ask questions about “Learn everything about Chiliz”.

Enroll to participate
Start the course to unlock the discussion. Enrolling helps us keep conversations relevant to learners.
WebsiteDiscoverPartner with UsBlogEvents
Discover
CoursesCircleRustSoliditySolanaWeb3 FundamentalsBlockchain Basics
CompanyAbout UsBrand GuidelineFAQsTerms of UsePrivacy PolicyGDPR NoticeCookies
Don't miss any update!

Disclaimer: The information, programs, and events provided on https://risein.com is strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice, nor do we make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://risein.com disclaims any responsibility for financial decisions made by users based on the information provided here.

© 2026 Rise In, All rights reserved