• 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

In this lesson we are gonna learn how to connect Wallet.

You can check this link for metamask connection.

Getting Started with Our Virtual Meeting Application Using Moralis

In this video, we begin developing our virtual meeting application, which integrates with blockchain using Moralis.

Why Moralis?

Throughout this project, we'll use Moralis to handle blockchain interactions. Instead of making direct blockchain calls (like using MetaMask and interacting with smart contracts manually), Moralis allows us to:

  • Use pre-built APIs for wallet and NFT operations.
  • Fetch data such as a wallet’s native balance with simple function calls.

This simplifies the development process and accelerates integration.

Step 1: MetaMask Authentication with Moralis

To interact with the blockchain securely, we first need to authenticate the MetaMask wallet. Moralis provides a dedicated Authentication API, complete with a React tutorial and working code examples. We'll adapt that boilerplate to fit our project’s requirements.

Step 2: Creating the useAuthentication Hook

We’ll isolate the MetaMask authentication logic in a custom React hook called useAuthentication. This improves modularity and keeps related functionality in one place.

Key Setup Includes:

  • Importing necessary libraries
  • Setting the user’s address and connection status using the wagmi library (a tool Moralis also uses)
  • Defining connectors for MetaMask (e.g., InjectedConnector)
  • Creating handlers for connecting and disconnecting from the wallet
const handleConnect = async () => {
  try {
    await connect();
  } catch (error) {
    console.error(error);
  }
};

const handleDisconnect = async () => {
  try {
    await disconnect();
  } catch (error) {
    console.error(error);
  }
};

Error Handling

We wrap both connection and disconnection handlers in try/catch blocks to log any errors encountered during these processes.

Step 3: Integrating App Context

We use a global React Context to store and manage the wallet address and connection status across the app. This ensures that values persist even when the page is refreshed.

  • setAddress() and setIsConnected() functions are imported from useAppContext
  • These functions update the global state based on MetaMask’s connection status

Example:

setAddress(address || "");
setIsConnected(isConnected);

Step 4: Returning Data from the Hook

We return the following from our hook so other components can interact with it:

  • address
  • isConnected
  • handleConnect
  • handleDisconnect

This encapsulates all MetaMask-related functionality and ensures other parts of the application can authenticate users easily without duplicating code.

Final Notes

We’ve now completed the basic MetaMask authentication functionality using Moralis and wagmi. This setup keeps authentication logic clean, modular, and accessible throughout your application.

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