# Chiliz Chain developer docs

## Welcome to the Sports Blockchain\_

Dive into Chiliz Chain, the dedicated blockchain leading the Sports & Entertainment revolution.

{% columns %}
{% column width="50%" %}
With Chiliz Chain, you can **provide fans with experiences** that ignite passion and push the boundaries of engagement.

{% embed url="<https://www.youtube.com/watch?v=EnZTBZvxC4s>" %}

Build a Fan Token gate, create a prediction market, mint Sports NFTs, etc. [Get inspired](https://greenhousehub.chiliz.com/)!
{% endcolumn %}

{% column width="50%" %}
**Build EVM-compatible SportFi apps** with 70+ major IP partners, and get direct access to passionate fanbases!

{% code expandable="true" %}

```javascript
// hardhat.config.js
module.exports = {
  solidity: "0.8.30",
  networks: {
    chiliz_testnet: {
      url: "https://spicy-rpc.chiliz.com/",
      chainId: 88882,
      accounts: [process.env.PRIVATE_KEY]
    },
    chiliz_mainnet: {
      url: "https://rpc.ankr.com/chiliz",
      chainId: 88888,
      accounts: [process.env.PRIVATE_KEY]
    }
  }
};
```

{% endcode %}
{% endcolumn %}
{% endcolumns %}

**Works with your toolset**\
\&#xNAN;*MetaMask, Hardhat, Moralis, thirdweb, Nodit, Remix, Magic, Privy, and* [*many more*](/community/chiliz-chain-ecosystem#developer-tools)*...*

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>Quick Start</strong></td><td><em>Just what you need</em></td><td></td><td><a href="/pages/pM9NkEQGgz7FFzj15Gme">/pages/pM9NkEQGgz7FFzj15Gme</a></td><td><a href="/files/s18vPf6xWyIfvE6Xo4uv">/files/s18vPf6xWyIfvE6Xo4uv</a></td></tr><tr><td><strong>Learn</strong></td><td><em>Concepts &#x26; theory</em></td><td></td><td><a href="/pages/gsiVaSyEWfFJFnE5ihkA">/pages/gsiVaSyEWfFJFnE5ihkA</a></td><td><a href="/files/TcnuaxtAvfBS8GTDLutp">/files/TcnuaxtAvfBS8GTDLutp</a></td></tr><tr><td><strong>Develop</strong></td><td><em>Dive into code</em></td><td></td><td><a href="/pages/bTudPfWaRi0swn5PmOgZ">/pages/bTudPfWaRi0swn5PmOgZ</a></td><td><a href="/files/7Pl5dRXyXWpQrwjBaBi5">/files/7Pl5dRXyXWpQrwjBaBi5</a></td></tr><tr><td><strong>Grants &#x26; Bounties</strong></td><td><em>Get funded</em></td><td></td><td><a href="/pages/PW2dnfj0G6myUxkb8vGi">/pages/PW2dnfj0G6myUxkb8vGi</a></td><td></td></tr><tr><td><strong>Community</strong></td><td><em>Join the game</em></td><td></td><td><a href="/pages/5ztqDql7oTBSPAfpPU0J">/pages/5ztqDql7oTBSPAfpPU0J</a></td><td></td></tr><tr><td><strong>Changelog</strong></td><td><em>News from the Chiliz devs</em></td><td></td><td><a href="/pages/8hUHjanAUbWzuh50Qeoi">/pages/8hUHjanAUbWzuh50Qeoi</a></td><td></td></tr></tbody></table>

{% hint style="info" %}
To stay up to date with the latest developments of Chiliz Chain,\
follow us on our [X.com/Twitter](https://twitter.com/chiliz) or join us on [Discord](https://discord.gg/chiliz) and [Telegram](https://t.me/BuildOnChiliz).
{% endhint %}


# Quick Start

Quick-start hub for Ethereum-savvy developers: Chiliz Chain network params, testnet faucets, smart contract deployment and verification, and running a node.

This section is aimed at developers who already know their way around blockchain technology, especially the Ethereum ecosystem.

It gives you the necessary information to kick-start your project with Chiliz Chain.

## The Gist of It

Get a bird's-eye view of what Chiliz Chain is about.

{% content-ref url="/pages/vA5aVavCeFBoGrYJUk3U" %}
[Chiliz Chain in a nutshell](/quick-start/chiliz-chain-in-a-nutshell)
{% endcontent-ref %}

## Developer Toolbox

{% content-ref url="/pages/Bky7yYKjAYqrm45vdgD2" %}
[Developer Toolbox](/quick-start/developer-toolbox)
{% endcontent-ref %}

The Chiliz Chain Developer Toolbox contains the following:

* Parameters to connect to Chiliz Chain Mainnet and Spicy Testnet.
* Links to Testnet faucets.
* Links to our contract deployment and verification guides.
* Parameters to run your own Chiliz Chain node.

## Starter Kits

The Chiliz Chain Starter Kits are step-by-step guides to achieve your goal on Chiliz Chain.

{% content-ref url="/pages/GoYR5mAz6m0YQBdOlKFz" %}
[Starter Kits](/quick-start/starter-kits)
{% endcontent-ref %}

## Online Courses

Level up your Chiliz Chain skills with free courses and bootcamps from our ecosystem partners.

{% content-ref url="/pages/GzZqg3Mo9IReTu8CZBbc" %}
[Free online courses](/quick-start/free-online-courses)
{% endcontent-ref %}

## Addresses

In these pages you will find the current addresses for all your needs.

{% content-ref url="/pages/pntXW13Q9weIyJKdyx0f" %}
[Inflation Supply Allocation Addresses](/quick-start/inflation-supply-allocation-addresses)
{% endcontent-ref %}

{% content-ref url="/pages/k4r14berpYf7wfSjUnYR" %}
[Smart Contract Addresses](/quick-start/smart-contract-addresses)
{% endcontent-ref %}

{% content-ref url="/pages/7uoBCNloNbn76vHzrLrS" %}
[Token Contract Addresses](/quick-start/token-contract-addresses)
{% endcontent-ref %}


# Chiliz Chain in a nutshell

High-level overview of Chiliz Chain: EVM-compatible sports blockchain with PoSA consensus, CHZ native token, on-chain governance, and Ethereum interoperability.

Chiliz Chain is a blockchain designed specifically for sports and entertainment. We bridge the gap between the sporting world and its fans through digital innovation and community involvement.

It focuses on enhancing fan engagement through tokenization, allowing fans to interact and engage with their favorite sports teams and clubs.

By using Chiliz Chain, teams can issue their own fan tokens, enabling supporters to participate in various decisions and access exclusive rewards and experiences.

## Chiliz Chain is:

* a self-sovereign blockchain. It provides security and safety to the elected validators.
* a distributed system with on-chain governance.
* compatible with the Ethereum Virtual Machine (EVM). It supports all the existing Ethereum tooling, with faster finality and reasonable transaction fees.
* interoperable with Ethereum Mainnet (and other chains in the future).

For any queries, feel free to connect with us on [Discord](https://discord.gg/chiliz) or [Telegram](https://t.me/BuildOnChiliz).


# Developer Toolbox

Mainnet and Spicy Testnet RPC parameters, free CHZ testnet faucets, contract deployment and verification guides, and Docker node launch commands.

## Connect to Mainnet and Testnet

Chiliz Chain is available through a Mainnet for your production projects, and has a Testnet for testing purposes. The Chiliz Testnet is called Spicy Testnet.

{% tabs %}
{% tab title="Chiliz Chain Mainnet" %}

<table><thead><tr><th width="253">Parameter</th><th width="346">Value</th></tr></thead><tbody><tr><td>Network Name</td><td>Chiliz Chain</td></tr><tr><td>RPC endpoint</td><td>Recommended:<br><a href="https://rpc.ankr.com/chiliz">https://rpc.ankr.com/chiliz</a><br><br>Alternatives:<br><a href="https://chiliz-mainnet.gateway.tatum.io">https://chiliz-mainnet.gateway.tatum.io</a><br><a href="https://chiliz-rpc.publicnode.com">https://chiliz-rpc.publicnode.com</a></td></tr><tr><td>RPC Websocket</td><td>wss://chiliz-rpc.publicnode.com</td></tr><tr><td>Chain ID</td><td>88888</td></tr><tr><td>Currency Symbol</td><td>CHZ</td></tr><tr><td>Chiliz Block Explorer URL</td><td>Recommended:<br><a href="https://chiliscan.com">https://chiliscan.com</a><br><br>Alternative:<br><a href="https://scan.chiliz.com">https://scan.chiliz.com</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Spicy Testnet" %}

<table><thead><tr><th width="253">Parameter</th><th width="312">Value</th></tr></thead><tbody><tr><td>Network Name</td><td>Spicy Testnet</td></tr><tr><td>RPC endpoint</td><td>Recommended:<br><a href="https://spicy-rpc.chiliz.com/">https://spicy-rpc.chiliz.com/</a><br><br>Alternatives:<br><a href="https://chiliz-testnet.gateway.tatum.io">https://chiliz-testnet.gateway.tatum.io</a><br><a href="https://chiliz-spicy-rpc.publicnode.com">https://chiliz-spicy-rpc.publicnode.com</a></td></tr><tr><td>RPC Websocket</td><td>Recommended:<br>wss://spicy-rpc-ws.chiliz.com/<br><br>Alternative:<br>wss://chiliz-spicy-rpc.publicnode.com</td></tr><tr><td>Chain ID</td><td>88882</td></tr><tr><td>Currency Symbol</td><td>CHZ</td></tr><tr><td>Spicy Block Explorer URL</td><td><p>Recommended:<br><a href="https://testnet.chiliscan.com/">https://testnet.chiliscan.com/</a></p><p><br>Alternative:<br><a href="https://spicy-explorer.chiliz.com/">https://spicy-explorer.chiliz.com/</a></p></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

For more information, see the [Connect using RPC](/develop/basics/connect-to-chiliz-chain/connect-using-rpc) page.

## Obtain testnet tokens

You can obtain free test CHZ tokens through a faucet, allowing you to experiment on Spicy Testnet without the financial risk of testing on Chiliz Mainnet.

There are currently two faucets available:

* [Spicy Faucet](https://spicy-faucet.chiliz.com/).
* [Tatum's Chiliz Faucet for Testnet](https://tatum.io/faucets/chiliz).

For more details on faucets, go to our dedicated page:

{% content-ref url="/pages/Af9548Yd4RQMNgtsUkq9" %}
[Obtain Free Testnet Tokens](/develop/basics/obtain-free-testnet-tokens)
{% endcontent-ref %}

## Deploy and verify a contract

Building a smart contract is an essential part of the creative project that leads to a dApp for Chiliz Chain (or any blockchain, really).

There are two steps that you **must** go through once you have built your dApp's smart contract:

1. Deploying the contract on Chiliz Chain.

{% content-ref url="/pages/zTkQQLpwajpWEoLHUp1b" %}
[Deploy a Smart Contract](/develop/basics/deploy-a-smart-contract)
{% endcontent-ref %}

2. Verifying that contract.

{% content-ref url="/pages/Lxl4NxqCWg16RmKF2Iln" %}
[Verify a Smart Contract](/develop/basics/verify-a-smart-contract)
{% endcontent-ref %}

## Solidity & EVM version

When writing and compiling contracts for Chiliz Chain, use the recommended Solidity and EVM versions:

{% hint style="info" %}
**Recommended Solidity and EVM versions for Chiliz Chain:**

* **Solidity compiler version:** `0.8.30` (or lower)
* **Target EVM version:** `prague`
  {% endhint %}

## Run a Chiliz Chain Node

Running your own Chiliz Chain node provides control and privacy but demands more technical skill and resources.

This page gives you the essential parameters to launch your node:

```bash
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 8545:8545 \
-p 8546:8546 \
chilizchain/ccv2-geth:latest \
--chiliz \ # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
--datadir=/datadir \
--ipcdisable \
--http \
--http.addr=0.0.0.0 \
--http.api=eth,net,web3,debug,txpool \
--http.port=8545 \
--http.corsdomain="*" \
--http.vhosts="*" \
--ws \
--ws.addr=0.0.0.0 \
--ws.api=eth,net,web3,debug,txpool \
--ws.port=8546 \
--ws.origins="*" \
```

For more details, check this more complete page:

{% content-ref url="/pages/9YZsEmPaaQYP2h1RqyS1" %}
[Run a Chiliz Chain Node](/develop/basics/connect-to-chiliz-chain/run-a-chiliz-chain-node)
{% endcontent-ref %}

Also, you might be interested in running a Validator node:

{% content-ref url="/pages/ppcymFdm3NKLps6cECR9" %}
[Running a Validator node](/learn/about-validators/running-a-validator-node)
{% endcontent-ref %}


# Starter Kits

Starter kits for building on Chiliz Chain: step-by-step guides for launching NFT collections and ERC-20 crypto tokens.


# Create NFTs for Your Sports Team

Step-by-step starter kit to launch a sports team NFT collection on Chiliz Chain: file preparation, IPFS hosting, ERC-721/ERC-1155 selection, thirdweb deployment, and OKX listing.

Here are the various steps to take you from nothing to selling a collection of NFTs branded to your team, such as player cards.

{% hint style="info" %}
For a more generic approach to NFTs, you can dive into the [Work with NFTs](/develop/advanced/work-with-nfts) section, which is heavily referenced in this page.
{% endhint %}

For each step, this starter kit points you to the relevant documentation page on this site, along with a short explanation. Get ready!

## Preparing the files

Whatever your target, an NFT project always requires two types of files:

* The visual assets themselves, which are the images or videos that you want to turn into NFTs.
* The metadata files, which describe the visual assets in a way that can be handled by blockchain tools (most notably, where they are hosted).

Learn more here:

{% content-ref url="/pages/8a6dGcAkUeJ78Zd5WHWo" %}
[Preparing the NFT files](/develop/advanced/work-with-nfts/preparing-the-nft-files)
{% endcontent-ref %}

When creating a "Seasonal Player" NFT series for your sports team, the graphic ratio could be one of these:

* Classic trading card: 630 x 880 pixels (2.5" x 3.5" ratio). This gives the nostalgic feel of physical sports cards.
* Modern digital: 1080 x 1080 pixels (Square) or 1080 x 1920 (Vertical Phone/Story format).

If you are creating an NFT series for team players, you should have a folder on your computer that looks like this:

```
/2024_2025_Season_Assets
    /Images
        player_01.png
        player_02.png
        ...
        player_11.png
```

With your files created, you must host them properly:

{% content-ref url="/pages/zkeWU5tiTSyRLD8MSwGQ" %}
[Hosting your NFT on IPFS](/develop/advanced/work-with-nfts/hosting-your-nft-on-ipfs)
{% endcontent-ref %}

Once your files are hosted on an IPFS host, you can generate the attached JSON files, resulting in this folder organization:

```
/2024_2025_Season_Assets
    /Images
        player_01.png
        player_02.png
        ...
        player_11.png
    /Metadata
        player_01.json  <-- Points to player_01.png on IPFS
        player_02.json  <-- Points to player_02.png on IPFS
        ...
        player_11.json  <-- Points to player_11.png on IPFS
```

{% hint style="info" %}
You don't have to create the metadata files by hand!\
Most NFT-centric tools will handle batch IPFS upload and metadata file generation for you.
{% endhint %}

## Setting up your Web3 environment

Before creating the NFTs, you need to configure certain technical details on your side.

### Install a Web3 wallet

The most well-known wallet is MetaMask.

{% content-ref url="/pages/sX0yak7ql3J63wsGoMHc" %}
[Install MetaMask](/learn/about-wallets/how-to-use-metamask/install-metamask)
{% endcontent-ref %}

{% content-ref url="/pages/7jmbvsuzJaARscErNwWb" %}
[How to use MetaMask](/learn/about-wallets/how-to-use-metamask)
{% endcontent-ref %}

### Configure the wallet for Chiliz Chain

Set it up to work on both networks:

* Spicy Testnet for testing your collection.
* Chiliz Mainnet once everything is tested and ready to launch.

{% content-ref url="/pages/tzJomHxArA5lwaA7IFvl" %}
[Link Chiliz Chain and MetaMask](/learn/about-wallets/how-to-use-metamask/link-chiliz-chain-and-metamask)
{% endcontent-ref %}

{% content-ref url="/pages/oYKKHjOmAZJp2Vfye0kX" %}
[Connect using RPC](/develop/basics/connect-to-chiliz-chain/connect-using-rpc)
{% endcontent-ref %}

### Obtain CHZ tokens

You will need some $CHZ in your wallet to pay for "gas" or transaction fees (deployment and minting).

#### For testing: Get free tokens

{% content-ref url="/pages/Af9548Yd4RQMNgtsUkq9" %}
[Obtain Free Testnet Tokens](/develop/basics/obtain-free-testnet-tokens)
{% endcontent-ref %}

#### For production: Buy CHZ tokens

You can buy CHZ tokens on most crypto exchanges: [Coinbase](https://www.coinbase.com/), [Meria](https://www.meria.com/), [Kraken](https://www.kraken.com/), [Bitpanda](https://www.bitpanda.com/), etc.

## Choosing your NFT standard

There are several NFT standard you can choose from, depending on your project's needs.

{% content-ref url="/pages/6jKxG34DH2ynN0hV3uMS" %}
[Choosing the right NFT contract](/develop/advanced/work-with-nfts/choosing-the-right-nft-contract)
{% endcontent-ref %}

For a "Seasonal Player" series, you need to decide how the NFTs will work:

* [ERC-1155](https://wizard.openzeppelin.com/#erc1155) (Edition / Multi-Token):\
  Recommended for Player Cards.\
  This allows you to create multiple copies of the same item (for instance, 100 copies of "Player A - 2024 Season").
* [ERC-721](https://wizard.openzeppelin.com/#erc721) (Collection):\
  Best if every single NFT is unique (e.g., "Player A - Signed 1/1").

## Creating and Hosting the NFTs

There are several ways to create (or "mint") your collection of NFTs.

### **The Dashboard Way (easiest)**

This is the easiest way for a sports team to deploy without writing complex code.

1. Go to [thirdweb](https://thirdweb.com/), create an account by connecting with your Web3 wallet. You will be directed to a dashboard.
2. Make sure that your wallet is set on Chiliz Chain Mainnet (or Spicy Testnet if you are testing).
3. Click on the "Create Project" button, give your project a name (for instance, "2025-2026 Team NFT"), and only all the "thirdweb.com" domain for now. Click "Create".
4. thirdweb then displays a Client ID and Secret Key, to be saved on your computer. These allow your app, if any, to authenticate to the project. Confirm that you saved them, and click "View Project".
5. From the project dashboard, click on the "Tokens" option on the left menu, then click on the "Create Token" button and select "NFT Collection".<br>

   <figure><img src="/files/QpOJ3oQZGhyevsx7YbnC" alt="" width="375"><figcaption></figcaption></figure>
6. From there, you can follow the guide from thirdweb:

{% embed url="<https://portal.thirdweb.com/tokens/deploy-erc721#Configure%20Collection>" %}

### **The Marketplace Way**

If you want to mint and immediately list for sale:

1. Go to [OKX](https://web3.okx.com/), create an account by connecting with your Web3 wallet, then open the [OKX NFT Studio](https://web3.okx.com/nft/create/home), which is part of the [OKX NFT Marketplace](https://web3.okx.com/nft).
2. Click "Create now", select "Bulk creation", then follow the instructions.

<figure><img src="/files/X7R4sE70R3k2GWECHwcg" alt=""><figcaption></figcaption></figure>

### **The Developer Way (Custom Contract)**

If you have developers, they can use Hardhat, Viem, Remix IDE, or other EVM-compatible tools.

Follow our guides in the [Work with NFTs](/develop/advanced/work-with-nfts) section for information on hosting, minting, and listing NFTs.


# Launch a crypto token

Complete guide to launching an ERC-20 token on Chiliz Chain: Solidity contract with OpenZeppelin, Remix deployment, Kayen Finance and FanX liquidity pool creation, DEX listing, and token launch strate

Having a custom token or "crypto coin" for your project makes it possible to foster a community around your own ticker (such as $PROJECT).\
From there, you can build more incentives for participation, such as a DAO for governance, reward points for user engagement, or just a fun social banner (a "meme coin").

As such, a custom coin can help your project grow, without intermediaries.

## Prerequisites

As always when working on a Web3 project, you first need a Web3 wallet:

{% content-ref url="/pages/XudO5ZSwSGp8EOmknCyH" %}
[About Wallets](/learn/about-wallets)
{% endcontent-ref %}

The most well-known one is MetaMask:

{% content-ref url="/pages/7jmbvsuzJaARscErNwWb" %}
[How to use MetaMask](/learn/about-wallets/how-to-use-metamask)
{% endcontent-ref %}

Make sure that it is [connected to Chiliz Chain](/develop/basics/connect-to-chiliz-chain)!

This wallet should have $CHZ tokens on it, which you can buy on any Web3 exchange (Coinbase, Kraken, Binance, Bitpanda, etc.).

## Creating the token's smart contract

Chiliz Chain being an [EVM](https://ethereum.org/developers/docs/evm/)-compatible blockchain, you can rely on contracts such as [ERC-20 ](https://docs.openzeppelin.com/contracts/5.x/erc20)for your token contract needs. We recommend the community-vetted OpenZeppelin contract, which you can [customize in their online wizard](https://wizard.openzeppelin.com/#erc20).

From that page, you can configure the contract for your own token:

* Give it a name and a symbol/ticker,
* Set an amount of token using the "Premint" field,
* Click on the "Mintable" feature to make your token mintable and ownable (and therefore, transferable).
* Uncheck the "Permit" feature for now.

As an example, here is a standard ERC-20 token contract that:

1. Is meant for an hypothetical $PROJECT token,
2. Mints a fixed supply of `1000` tokens to a `recipient` wallet (either your wallet, or a vault) upon deployment, owned by an `initialOwner` wallet (yours).
3. Includes standard ERC-20 functions like `transfer`, `approve`, and `balanceOf`,
4. Includes a restriction on who can mint it (=you, the owner) through the [OpenZeppelin Ownable](https://docs.openzeppelin.com/contracts/5.x/api/access#Ownable) contract module.

```solidity
// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.5.0
pragma solidity ^0.8.30;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

contract MyOwnProjectToken is ERC20, Ownable {
    constructor(address recipient, address initialOwner)
        ERC20("My Own Project Token", "PROJECT")
        Ownable(initialOwner)
    {
        _mint(recipient, 1000 * 10 ** decimals());
    }

    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);
    }
}
```

{% hint style="info" %}
**Recommended Solidity and EVM versions for Chiliz Chain:**

* **Solidity compiler version:** `0.8.30` (or lower)
* **Target EVM version:** `prague`
  {% endhint %}

## Compiling, deploying & verifying

Now it's time to compile and deploy your contract. The OpenZeppelin wizard allows you to either open your custom contract right in [Remix IDE](https://remix.ethereum.org/), to download the file (as a single file or as a sample Hardhat or Foundry project), or to just copy it in the clipboard, ready for you to paste it in your development environment.

If you're new to this, we advise you to rely on Remix, for which we have steps here:

{% content-ref url="/pages/cwZqLlr1ee8FwupJJUCc" %}
[Deploy with Remix](/develop/basics/deploy-a-smart-contract/deploy-with-remix)
{% endcontent-ref %}

{% hint style="danger" %}
Make sure to configure Remix to use the 0.8.30 version of the compiler, with the "Prague" EVM version.
{% endhint %}

Of note: Before you can deploy your contract, Remix will ask you for the `recipient` and `initialOwner` addresses.\
This is where you indicate the Web3 address of the wallet that will receive the initial supply, and your own address as owner of the token.\
A single address can be used for both, or a different addresses for each.

<figure><img src="/files/c4DoDdnlv3Uvkq9Z6BFt" alt="" width="264"><figcaption></figcaption></figure>

Once you have deployed the contract, you must verify it. Follow our guides, depending on your development environment:

{% content-ref url="/pages/Lxl4NxqCWg16RmKF2Iln" %}
[Verify a Smart Contract](/develop/basics/verify-a-smart-contract)
{% endcontent-ref %}

## Importing the new token address in your wallet

Note that even if your contract is correctly deployed and verified, your wallet will not automatically display your new token. You must manually tell the wallet to track this specific asset.

This is a copy-paste job:

1. In Remix, go to the "Deployed Contracts" section, find your newly deployed contract, and click the "Copy to Clipboard" icon next to the contract name/address. It will start with `0x...`.
2. Now open your Web3 wallet, make sure you are connected to Chiliz Chain (or Spicy Testnet), click the "Tokens" tab, and from the "..." menu click the "Import tokens" option.

Then follow the steps:

1. Paste the token contract address in the importer text field.
2. Check that the wallet does detect the token's symbol and decimals (should be 18).
3. Click "Add Custom Token" then "Import Tokens".

Success! You should now see your token balance in your wallet list.

You are now ready to move funds or create a liquidity pool.

## **Creating the Liquidity Pool**

Now that your token exists in your wallet, it is time to make it tradable. This is done through a liquidity pool (LP).

{% hint style="info" %}
A liquidity pool is required to make your token tradable and to give it a price.

It works by holding a supply of your new token and a supply of $CHZ in a smart contract.

When users want to buy your token, they send $CHZ to the pool and receive your token in exchange.\
This allows trading to happen instantly without you having to act as a middleman.

As the wallet-owner who funded the pool, you earn a small fee from every trade.\
In effect, this turns your pool into a passive income stream, and ensures market stability for your community.
{% endhint %}

We will use [Kayen Finance](https://www.kayen.finance/) (or [FanX](https://app.fanx.xyz/)), the leading decentralized exchanges (DEXes) on Chiliz Chain.

They provide a complete set of instructions:

{% embed url="<https://kayen-finance.gitbook.io/docs/kayen-dex-user-guide/pools/creating-a-liquidity-pool>" %}

{% embed url="<https://fanx.gitbook.io/fanx-docs/fanx-user-guide/new-pool-creation>" %}

Once you have created the pool, it is time to add liquidity to it.\
Follow these guides:

{% embed url="<https://kayen-finance.gitbook.io/docs/kayen-dex-user-guide/pools/adding-liquidity-to-a-pool>" %}

{% embed url="<https://fanx.gitbook.io/fanx-docs/fanx-user-guide/add-liquidity>" %}

{% hint style="danger" %}
**Setting the initial price for your token**

This is a critical step.

As the first liquidity provider, *you* decide the starting price of your token. The price is determined purely by the ratio of the two assets you deposit.

We advise you to follow this formula: `Price of Your Token = Amount of CHZ / Amount of Your Token`

For example, if you want 1 $PROJECT token to be worth 0.1 $CHZ, here is how to fill the Add Liquidity field in the Kayen Finance or FanX interface:

* "Token A": Input 10,000 $PROJECT.
* "Token B": Input 1,000 $CHZ.

Result: The initial price is set to 0.1 $CHZ per $PROJECT token.
{% endhint %}

## Giving Your Token a Personality

By default, your token will appear on DEXs and explorers as a generic placeholder icon with no social links.

### Getting Listed on DEXs

For a coin, getting listed means appearing in a DEX's public list of supported tokens.

There are two DEXs in the Chiliz Chain ecosystem:

{% embed url="<https://www.kayen.finance/>" %}

{% embed url="<https://app.fanx.xyz/explore?tab=tokens>" %}

To appear in their lists, the process is quite similar for both DEXs. Neither require whitelisting. Tokens automatically become searchable and tradable as soon as liquidity is added.

However, to add a logo, you need to contact their respective team. You can open a support ticket on their Discord server:

* [Kayen Finance Discord server](https://kayen.finance/discord), in the `#help` channel.
* [FanX Discord server](https://discord.gg/2GxuJvbQA6), in the `#questions` channel.

### Putting Your Infos on Explorers

#### On Chiliscan / Routescan

The quickest and easiest way is to click the button in the top right corner and choose the "Submit name tag" option.

<figure><img src="/files/bAz5qAJ8esGZd4YzUw6E" alt="" width="375"><figcaption></figcaption></figure>

This will take you to [a form](https://forms.routescan.net/forms/form-label) where you can provide all the necessary information.

Once submitted, the Routescan team will update the details within a few day.

#### On Chiliz Block Explorer / Blockscout

(coming soon)

## Sanity Checks

Is everything safe and secure? Are you *sure*? Time to kick the tires and make sure your token and pool are functioning correctly.

### Perform a "Smoke Test" Swap

You should never assume the pool works just because the transaction didn't fail. You need to simulate a real user experience.

{% hint style="info" %}
[Smoke testing](https://en.wikipedia.org/wiki/Smoke_testing_\(software\)) is meant to reveal simple failures that are severe enough to, for example, reject a project release.
{% endhint %}

To run a smoke test on your token, you must act as if you were a real user:

1. Create a second wallet (or use a friend's wallet) that has never interacted with your token (or it's smart contract). That wallet should have $CHZ already. If not, send some over.
2. From this wallet, try to buy your token (through Kayen Finance or FanX, for instance), then check for errors:
   1. Does the swap fail?
   2. Is the "Price Impact" unreasonably high?
3. Now, attempt to sell the token you just bought: Swap 50% of the tokens back to $CHZ. Again, check for errors.

{% hint style="warning" %}
Some malicious tokens disable selling; you want to prove that yours doesn't.
{% endhint %}

### Confirm Pricing & Arbitrage

When you first initialize a pool, you set the price manually. If you made a slight error in your calculation, the DEXs' [arbitrage bots](https://www.webopedia.com/crypto/learn/crypto-arbitrage-bot/) may have immediately bought tokens to correct the price to market value.

For instance, if you intended the price to be 0.1 $CHZ but it is now 0.0001 $CHZ, bots likely "sniped" your cheap liquidity.

Check the current price of your token on the DEX interface (Kayen Finance or FanX).\
If the price is drastically wrong and you haven't locked liquidity yet, you can still Remove Liquidity (Pull LP), re-calculate your ratios, and re-create the pool.

{% embed url="<https://kayen-finance.gitbook.io/docs/kayen-dex-user-guide/pools/removing-liquidity-from-a-pool>" %}

{% embed url="<https://fanx.gitbook.io/fanx-docs/fanx-user-guide/remove-liquidity>" %}

Do this now! You cannot fix this after you lock your liquidity.

## Launch time!

Technically, your token is "launched" the moment the Liquidity Pool is active on Kayen Finance or FanX.

However, in the crypto industry, a token launch is a coordinated event that combines technical details with social promotion.

A successful launch implies three phases:

* Community building,
* The launch itself,
* Post-launch momentum.

### Community Building

The most successful projects build a community *before* the contract is deployed.

Establish you tokens online presence:

* Create a dedicated Telegram account: Telegram is the industry standard for real-time chat and "hype." Setup bots (like [Rose](https://missrose.org/) or [Combot](https://combot.org/)) immediately to prevent spam.
* Create a dedicated Discord server: Discord is better for organized discussions, governance voting, and support tickets.
* X (Twitter): This is the public face of your project. This is where discovery happens.

Then, run an "Alpha" Phase, with the goal of gather real users in your Telegram who are waiting for the contract address:

* Tease the project concept 1–2 weeks before deployment.
* Release your "Whitepaper" or "Litepaper" (a simple document explaining the token's utility or meme value).

{% embed url="<https://www.bitbond.com/resources/crypto-whitepaper-how-to-write-it/>" %}

### The launch itself

This is the most critical 30-minute window of your project's life. It is called a TGE, for Token Generation Event.

First, you need to coordinate the timing, and inform your community. Announce a specific date and time for the launch (e.g., "Trading starts Tuesday at 14:00 UTC").\
Alternatively, you can do a "Stealth Launch": no timer, sudden announcement. This prevents bots from preparing, but generates less initial volume.

Is everyone ready and waiting? Time to release the token!\
The moment you add liquidity on Kayen Finance or FanX, post the smart contract address and a Direct Buy Link in your official channels.

{% hint style="warning" %}
**Security Warning**

Scammers will instantly post fake contracts in your comments. You must explicitly pin the real address and mute the chat for 5 minutes so only *your* message is visible.
{% endhint %}

As part of the launch event, you can host a voice chat with your community, using Telegram or Discord. Hearing the developer's voice builds immense trust and calms nerves during initial volatility.

### Post-Launch Momentum

Once the token is live and your community starts interacting, your role shifts from "Hype" to "Sustainment".

Here are some ideas:

* Have a trading competition: Partner with the DEX (Kayen Finance or FanX) to host a volume competition, such as "The top 10 traders by volume this week win 100 $CHZ." This incentivizes volume, which ranks your token higher on trending lists.
* Engage with SportsFi communities and reach out to "Key Opinion Leaders" (KOLs) or influencers who specialize in Chiliz or Sports tokens.
* If you promised a feature tied to your token (e.g., a prediction game, a voting app, or NFT access), deliver the first version ([MVP](https://en.wikipedia.org/wiki/Minimum_viable_product)) within 1–2 weeks of launch to prove that you are not a [vaporware](https://en.wikipedia.org/wiki/Vaporware) project.

## Next steps

### Lock Your Liquidity (LP Tokens)

When you provide liquidity to the token's pool, you receive what is called "LP Tokens" (Liquidity Provider Tokens). Holding 100% of these tokens in your personal wallet signals a risk to investors, as it allows you to withdraw all trading liquidity at any time (a "[rug pull](https://en.wikipedia.org/wiki/Exit_scam)").

To build community trust, you should lock your LP tokens in a smart contract for a fixed duration (e.g., 6 months or 1 year). This proves that the liquidity cannot be removed.

Since Chiliz Chain is EVM-compatible, you can:

* Check major locker platforms for Chiliz Chain support.
* Deploy a simple `TokenTimelock` contract ([using OpenZeppelin standards](https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#TokenTimelock)), transfer your LP tokens to it, and verify the contract on [Chiliscan](https://scan.chiliz.com/). Share the contract link with your community as proof of safety.


# Free online courses

Free online learning resources for building on Chiliz Chain: HyperNest 3-month bootcamp with VC access, and Rise In course covering Moralis, thirdweb, and NFT marketplaces.

## Hypernest bootcamp

<figure><img src="/files/YdtAnuxXheBloGK3ZZDV" alt="" width="196"><figcaption></figcaption></figure>

In May 2025 [HyperNest](https://hypernest.xyz/) built the Chiliz Bootcamp, an exclusive 3-month accelerator program tailored for early-stage startups building on Chiliz Chain.

Apply now:

{% embed url="<https://hypernest.xyz/chiliz-bootcamp/>" %}

Whether you're building the next Fan Token empire or a new form of digital fandom, this is where your journey scales.

**Bootcamp Details**:

* Grants & ecosystem support from Chiliz
* Direct access to 50+ top VCs
* Angels & investment DAOs on speed dial
* 30+ hours of expert-led sessions
* $200K+ in startup perks (Google Cloud, HubSpot, Covalent)
* Liquidity, marketing & mentorship boosts

The future of Web3 sports & entertainment is being built right now. Apply now!

## Rise In online course

<figure><img src="/files/6oVqcJlxzOL108kYQBMH" alt="" width="150"><figcaption></figcaption></figure>

In October 2023, [Rise In](https://www.risein.com/) created a free online course about building projects on Chiliz Chain.

Join now:

{% embed url="<https://www.risein.com/courses/build-on-chiliz>" %}

> Join us in an immersive learning experience designed to empower participants with the knowledge and skills needed to navigate the Chiliz Chain ecosystem.\
> \
> This cutting-edge program combines hands-on development with theoretical understanding, focusing on key technologies such as Moralis and Thirdweb.\
> \
> By the end of this course, students will not only comprehend the intricacies of Chiliz Chain but will also be proficient in developing a Virtual Meetup Platform and NFT marketplace.


# Inflation Supply Allocation Addresses

Official Chiliz Chain Mainnet and Spicy Testnet wallet addresses for Dragon8 inflation supply allocation: Community Vault/LP and Ecosystem & Operational Distribution.

With the Dragon8 hard fork, an inflationary model has been implemented into Chiliz Chain, with a perpetual burn mechanism introduced to balance the token supply, enhance value stability, and maintain scarcity over time.

Learn more about it here:

{% content-ref url="/pages/3AbrRNzTD1tEkNWTNtIJ" %}
[May 2024: Dragon8 (Tokenomics 2.0) Proposal](/chiliz-chain-changelog/governance-proposals-and-decisions/may-2024-dragon8-tokenomics-2.0-proposal)
{% endcontent-ref %}

Inflation will be supported by allocation from the following official Chiliz addresses:

* Community Vault, $CHZ LP (liquidity provider) and possible Shared Security Restaking Rewards:
  * Mainnet: `0x8DE8eeD0db5275F4235D7cc3f808780847eb2ADb`
  * Testnet: `0x060eA461Cf7E78A38400dE9255687beb9b2c7298`
* Ecosystem and Operational (E\&O) Distribution:
  * Mainnet: `0xe4479067BfAc12750DF05e26301134D01ddB2cdB`
  * Testnet: `0x060eA461Cf7E78A38400dE9255687beb9b2c7298`


# Smart Contract Addresses

Complete reference of Chiliz Chain system contract addresses: Staking, Governance, ChainConfig, Tokenomics, Fan Token staking, Pepper, and LayerZero endpoint contracts for chain IDs 88888 and 88882.

When building on Chiliz Chain, you will need to integrate certain functionalities that are provided through our smart contracts. This page provides you everything you need.

## Chiliz Chain contract addresses

{% hint style="info" %}
Addresses are the same whether you are working on Chiliz Chain Mainnet or on Spicy Testnet.
{% endhint %}

{% hint style="warning" %}
Make sure to always use the correct Chain ID in your code:

* Chiliz Chain Mainnet: `88888`
* Spicy Testnet: `88882`
  {% endhint %}

| Contract                                                     | Contract Address                           |
| ------------------------------------------------------------ | ------------------------------------------ |
| Staking                                                      | 0x0000000000000000000000000000000000001000 |
| Slashing Indicator                                           | 0x0000000000000000000000000000000000001001 |
| SystemReward                                                 | 0x0000000000000000000000000000000000001002 |
| StakingPool (wrapper of Staking, used by users, dApps, etc.) | 0x0000000000000000000000000000000000007001 |
| Governance                                                   | 0x0000000000000000000000000000000000007002 |
| ChainConfig                                                  | 0x0000000000000000000000000000000000007003 |
| RuntimeUpgrade                                               | 0x0000000000000000000000000000000000007004 |
| DeployerProxy                                                | 0x0000000000000000000000000000000000007005 |
| Tokenomics                                                   | 0x0000000000000000000000000000000000007006 |
| <p>Multicall<br><em>(Mainnet only)</em></p>                  | 0x0E6a1Df694c4be9BFFC4D76f2B936bB1A1df7fAC |

In addition to these, the [Kayen Finance](https://www.kayen.finance/) and [FanX](https://app.fanx.xyz/) teams have created specific contracts to work with their DEX:

{% embed url="<https://kayen-finance.gitbook.io/docs/contracts/contracts>" %}

{% embed url="<https://fanx.gitbook.io/fanx-docs/contract/contracts>" %}

## Fan Token contract addresses

### List of Fan Tokens

You can find the complete list of tokens on this page:

{% content-ref url="/pages/7uoBCNloNbn76vHzrLrS" %}
[Token Contract Addresses](/quick-start/token-contract-addresses)
{% endcontent-ref %}

### Fan Token staking contracts

For Fan Token staking, you can use these addresses on Chiliz Chain Mainnet:

| Contract       | Contract Address                           |
| -------------- | ------------------------------------------ |
| Proxy          | 0x5ff7f9724fd477d9a07dcdb894d0ca7f8fae1501 |
| Implementation | 0xD1bAfa7A246f5685cd22A563FD20fb164fAF0A4c |

## Pepper contract addresses

The [$PEPPER community token](https://www.peppercoin.com/) has its own set of addresses on Chiliz Chain Mainnet:

| Contract       | Contract Address                           |
| -------------- | ------------------------------------------ |
| Pepper Factory | 0xb06709919e0279fC7e01bfBc4Cead2dD99F74Ca8 |
| Pepper Staking | 0x5cA4C88339D89B2547a001003Cca84F62F557A72 |

## LayerZero contract addresses

Chiliz Chain implements the [LayerZero protocol](https://layerzero.network/), to make Fan Token omnichain.

{% tabs %}
{% tab title="Chiliz Chain Mainnet" %}
Layer Zero Endpoint ID (`eid`) for Chiliz Chain Mainnet: `30409`.

| Contract                                                       | Contract Address                           |
| -------------------------------------------------------------- | ------------------------------------------ |
| EndpointV2                                                     | 0x6F475642a6e85809B1c36Fa62763669b1b48DD5B |
| sendUln302                                                     | 0xC39161c743D0307EB9BCc9FEF03eeb9Dc4802de7 |
| receiveUln302                                                  | 0xe1844c5D63a9543023008D332Bd3d2e6f1FE1043 |
| <p>blockedMessageLib<br><em>(Blocked Message Library)</em></p> | 0xc1ce56b2099ca68720592583c7984cab4b6d7e7a |
| executor                                                       | 0x4208D6E27538189bB48E603D6123A94b8Abe0A0b |
| Dead DVN                                                       | 0x6788f52439ACA6BFF597d3eeC2DC9a44B8FEE842 |
| {% endtab %}                                                   |                                            |

{% tab title="Spicy Testnet" %}
Layer Zero Endpoint ID (`eid`) for Spicy Testnet: `40440`.

| Contract                                            | Contract Address                           |
| --------------------------------------------------- | ------------------------------------------ |
| EndpointV2                                          | 0x3aCAAf60502791D199a5a5F0B173D78229eBFe32 |
| sendUln302                                          | 0x45841dd1ca50265Da7614fC43A361e526c0e6160 |
| receiveUln302                                       | 0xd682ECF100f6F4284138AA925348633B0611Ae21 |
| <p>blockedMessageLib<br>Blocked Message Library</p> | 0xa229b65cc2191bf60bc24efcda3487d7b5c0c9f0 |
| executor                                            | 0x701f3927871EfcEa1235dB722f9E608aE120d243 |
| {% endtab %}                                        |                                            |
| {% endtabs %}                                       |                                            |

You can double-check that information in the LayerZero documentation:

{% embed url="<https://docs.layerzero.network/v2/deployments/chains/chiliz>" %}

{% embed url="<https://docs.layerzero.network/v2/deployments/deployed-contracts?chains=chiliz>" %}

The LayerZero team also provides a quick-start guide to mint and transfer an Omnichain Fungible Token (OFT) between Chiliz Mainnet and any other supported chain:

{% embed url="<https://docs.layerzero.network/v2/deployments/evm-chains/chiliz-mainnet-oft-quickstart>" %}


# Token Contract Addresses

Full list of Fan Token and CHZ contract addresses across Chiliz Chain, Solana, and Base, covering 60+ sports clubs and organizations including $PSG, $BAR, $JUV, and $CITY.

Here is the list of tokens supported by the Chiliz ecosystem, on Chiliz Chain, Solana, and Base.

| Token name                       | Ticker                                    | Chiliz Chain                                                                     | Solana                                                                        | Base                                                                            |
| -------------------------------- | ----------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Chiliz                           | ![](/files/uU8AwCWyDv1t64kwcIvj) $CHZ     | Native token                                                                     | [View](https://solscan.io/token/6eftxVbSAunVEoxUWdGhPdxg5UdsJ8Wkwy5w5YFuxouw) | [View](https://basescan.org/token/0x70c8392DE9b39a1E48d12A70Af6FF4Be25D6D0A2)   |
| PEPPER                           | ![](/files/31sPEtxi3R40WUcPYkgq) $PEPPER  | [View](https://scan.chiliz.com/token/0x60F397acBCfB8f4e3234C659A3E10867e6fA6b67) | [View](https://solscan.io/token/GozPNCAseytzxCR3d2k8hTsTYkr4SDpuXy2RQAZFVx2g) | [View](https://basescan.org/token/0x5e985E4BCa4664E985f3FaF8140EbA25b10E28C2)   |
| AC Milan                         | ![](/files/sexW8VYX20gYGuNCovKr) $ACM     | [View](https://scan.chiliz.com/token/0x062f6004fd0bf204d272ff115e5b84f7a01489d1) | [View](https://solscan.io/token/H5qGPniSX2uCNtAnxr7RpdfFAZcGkr6dknjgpa1AKHe1) | [View](https://basescan.org/token/0x886edf4ce5d879667bb62271bb9d59227b689cdc)   |
| Arsenal FC                       | ![](/files/FOcQHDJmzUF5GS3gn8SM) $AFC     | [View](https://scan.chiliz.com/token/0x76088F3eD5dC655De9295D93868ec1EeC654A615) | [View](https://solscan.io/token/Dst93spXQEXxFzwYbFrQRnFYBYpw7AzB2QyALEeP4NGQ) | [View](https://basescan.org/token/0x580edA966a8129C3c01D149871B47feFcC599D28)   |
| Alanyaspor                       | ![](/files/uTz29hHYxhNFaWLFh98A) $ALA     | [View](https://scan.chiliz.com/token/0x3B60F483fe311FC063b50A67BF327F96B76696E6) | [View](https://solscan.io/token/7hoDr3WJbQD25b2foZqEretHUD4fY1MWkKNp1dytnY2v) | [View](https://basescan.org/token/0x302694b3e0e21c443d55cb4bcaffe2e6ae58ee85)   |
| Alliance                         | ![](/files/hJBCopluH5FHrgsWl1FA) $ALL     | [View](https://scan.chiliz.com/token/0x109b738569a04ea31ca06b47af06cfdda87adf48) | [View](https://solscan.io/token/HkeMF6QnfVGwhvHTKJxtkyeiFjyYUESfgzBwGojtyJ4X) | [View](https://basescan.org/token/0xa6f9ec922bad0573ca9802e1e1cc0880ad5c23b8)   |
| Aston Martin Cognizant           | ![](/files/zw7iMgiy8evOKMaHbpXv) $AM      | [View](https://scan.chiliz.com/token/0xf0D5De46729f4E2F28c27a98E15Ef18dF951Ec44) | [View](https://solscan.io/token/5FnbDoHAX9Dsu27pTcZpmj6VU3YUmjqqWLz6tXYZwy2P) | [View](https://basescan.org/token/0x011890cddbd63ae7edc0165a6eb2acb4a31694ba)   |
| Apollon Limassol FC              | ![](/files/UTqdKA6lfPT7cIlB65BP) $APL     | [View](https://scan.chiliz.com/token/0x0b00e360bee5557d0d9a548030aa8f7182daf56f) | [View](https://solscan.io/token/ff3G7QPz7MtYB2ZcfC6Tj9PUWZBPGE8zygc764a8Jwi)  | [View](https://basescan.org/token/0xa0a05422895df6a07d1c2277475521d933d2e81a)   |
| Argentina                        | ![](/files/hl6IeJMIFcY02zC43r8B) $ARG     | [View](https://scan.chiliz.com/token/0x4394886B1eec08Fe88681462914702dC99D97Eb7) | [View](https://solscan.io/token/BX8VbHBf8DUHeGJjJsSW2HCviGyQSF5SVCEnN7vXUkwM) | [View](https://basescan.org/token/0xb2798c409e58db6be0998cd9bf8ab8081bc949a4)   |
| AS Monaco                        | ![](/files/e8rUiCTEx9fyBlf248U2) $ASM     | [View](https://scan.chiliz.com/token/0x57F3D2382025cF5d6c3B126dcE0360D9Cf3AfF49) | [View](https://solscan.io/token/A2XmL1189cLLdueuUBKggSJkCymz3Q6xpeqba5VzhvLN) | [View](https://basescan.org/token/0x921816f7259a4192590cfd20ef821e0d6e769d69)   |
| AS Roma                          | ![](/files/Q0wLHx8FBERXMBkSKqNY) $ASR     | [View](https://scan.chiliz.com/token/0x0ac7bf9783ca1dcd86a39b5a2607160d29256eb0) | [View](https://solscan.io/token/3cVuTnMj8FeqK82PDgK4JzKnLP7LM6GauqTyqnxtcSk1) | [View](https://basescan.org/token/0x53838837f258f8ef337c8b4ceb60a89190ecba8b)   |
| Atlas FC                         | ![](/files/KcnxcSEH1xTuDB19Wbm6) $ATLAS   | [View](https://scan.chiliz.com/token/0xc1a2b6950786383114828fcf816199b6d5f4960a) | [View](https://solscan.io/token/2YSJqm3apDBCwv5a9bHV63Rexuo24grTzd8K9EZ1yDZp) | [View](https://basescan.org/token/0x3bae7552b89355922c1603773856fed9469b916c)   |
| Atlético de Madrid               | ![](/files/DDGL0WqhtAU1G6U0ZhjG) $ATM     | [View](https://scan.chiliz.com/token/0x7da0eb973d982ffca095e80437f5e37459a95c67) | [View](https://solscan.io/token/6VdpC1hcx7byFtJ5M6Xhspa6Uup5rZHruzXvuJhXAyXm) | [View](https://basescan.org/token/0xb46357d8ed050d35d3a24154c39d7236dae86187)   |
| Aston Villa                      | ![](/files/6pOfkm0LQ77gxrRcvvI7) $AVL     | [View](https://scan.chiliz.com/token/0x4f3a607bb2717683108865fc785badfa90094431) | [View](https://solscan.io/token/4o89KZs6pMf1YU2iXQcguquroJySET8rpXUz9sBG2q46) | [View](https://basescan.org/token/0x6ffa94c13a938d39159cf8847ba0e2ff5071a25c)   |
| EC Bahia                         | ![](/files/DHM2Aoi5KdvNAskWRpoZ) $BAHIA   | [View](https://scan.chiliz.com/token/0xc75037B67Ade9364F451D49bfAE776619a292181) | [View](https://solscan.io/token/4dwQdsgtPz3BM9frebdqp4f7v9mLmstppefdw1vjixEh) | [View](https://basescan.org/token/0x778ef7c8ddf7c1fc6948a2544ff7414952e0a32b)   |
| FC Barcelona                     | ![](/files/pG23Ug8GUReVcIRbX8zf) $BAR     | [View](https://scan.chiliz.com/token/0x1589248b4b61ed472cc21ca1f2114d93ab6910d5) | [View](https://solscan.io/token/82DNsTK61ZrgCHP6pfP32Eubcsp9h38d64E6X9ETEBBe) | [View](https://basescan.org/token/0x110A0fC65a0f78840f4b4A04A42e8c285E424553)   |
| Belgium National Team            | ![](/files/8QNpQ9t7rdKOjbdlm7l4) $BELG    | [View](https://scan.chiliz.com/token/0x6c4C9DFE8C940b51B68d00C6D76dE756B252f328) | [View](https://solscan.io/token/2aYxvDB3JvJwzGRiDWeiSk1rGpGQj8s2w66dVQvhcKmF) | [View](https://basescan.org/address/0xdaa70e3b315a8dc54f808d023a754fe4799642f3) |
| SL Benfica                       | ![](/files/JncMsy4MyAwGMPlCDGj6) $BENFICA | [View](https://scan.chiliz.com/token/0xf4c653b74929953b29b966aba99b681fb5ab69cf) | [View](https://solscan.io/token/HD9i9C2Pw6hWXm354i3SWkYG8ZtfikUJn2bNPzwQZcEK) | [View](https://basescan.org/token/0x4ac77502bd0cb186fdbf49e57e963771bd1e2d94)   |
| Bologna FC                       | ![](/files/AIKLt0xgH9fjA4p1EauJ) $BFC     | [View](https://scan.chiliz.com/token/0xd77de9fce56f371e347217d57394f1fa07f02d64) | [View](https://solscan.io/token/J7dBeunETSUx7dPCibsK7oNsz6QNDbLTUv3Kw2YFT5VT) | [View](https://basescan.org/token/0x7d7fc0ea0e4a9b89b203b7f1c2b131d1c3160817)   |
| BALI UNITED                      | ![](/files/mTFtj8vxIoMZKd9t2fGV) $BUFC    | [View](https://scan.chiliz.com/token/0xafb78165c62744bd21b4ddef48c11a93d395daa2) | [View](https://solscan.io/token/3pBn4BrVMsS93Lytj6Cf28WbxsJXdGevVb2iedywmk61) | [View](https://basescan.org/token/0x1da6588247e27e5426ae29122865bc46f6ed422e)   |
| Club Atlético Independiente      | ![](/files/VPNWx3KXBkh1KGweBFwP) $CAI     | [View](https://scan.chiliz.com/token/0x99f7b1f8d445b6cbd231017820de372e2c5f9a27) | [View](https://solscan.io/token/2zNLNYHfZGvDSQL29NrWNzPbenzWYSDUDH2c8Rxy9xfW) | [View](https://basescan.org/token/0xad5d606b408c50ddc6f360c6f70b946caccbcc66)   |
| Chivas                           | ![](/files/jFaTU4s05td4Ar8vNvan) $CHVS    | [View](https://scan.chiliz.com/token/0x3624ba092480fb0bdb5ec50ebac699bdfa561416) | [View](https://solscan.io/token/BJpndXvh37zEg5TQd5KcWzvyvycDTuo7uCRnHpq8GoCA) | [View](https://basescan.org/token/0x2be771b623f3fb641a50dc5a2d0fae4b1ac0229f)   |
| Manchester City FC               | ![](/files/3bSPAEUWdqtATVtjRUgE) $CITY    | [View](https://scan.chiliz.com/token/0x7bd6242d775faef1d50b2aa18c2fbf329bddf295) | [View](https://solscan.io/token/8WbNQtY7QmXMVKJFTSqFudierVZZtbuoyeepZEqJ1B2w) | [View](https://basescan.org/token/0x02300475d1EdD5b2E88EFdeBD3fFb549110D8Aa6)   |
| Crystal Palace                   | ![](/files/L1YIKA12cQw9pBdjS0pZ) $CPFC    | [View](https://scan.chiliz.com/token/0x58613484D9683d52899e13d42BB3fb9eEB0749da) | [View](https://solscan.io/token/34R8NsHYctkbXJ6yxKfyStFLuWbeioJiRKbY5Vn9eyry) | [View](https://basescan.org/token/0x401467a58df4c87f010c37a57988efa73c4c8ee7)   |
| Davis Cup                        | ![](/files/ysJyBfYGYIHMpdVbylSN) $DAVIS   | [View](https://scan.chiliz.com/token/0x97b79dd60a1211a9612f98194591f4483ff83ce3) | [View](https://solscan.io/token/DGBGtBwKKX3yCJGTtVDPE75uGN26p4ME6iSfQMuYQvb5) | [View](https://basescan.org/token/0x67a7831fb11c6ada4b729584e2ef9d01e6bceceb)   |
| Ninjas in Pyjamas                | ![](/files/8oX5EfRhSP45R7nu57r8) $DOJO    | [View](https://scan.chiliz.com/token/0xb66D72efc5fD77A8F9Dc2E7c0f14304828956644) | [View](https://solscan.io/token/8gcvHCxXWUNcpD4QahroPCoZExTKNMUwdmFCG4jsd9Wg) | [View](https://basescan.org/token/0xb3fd5687b1a388112acc1d02382c5759d040dc6f)   |
| Dinamo Zagreb                    | ![](/files/14xfFEXbK1cyYySRmPgf) $DZG     | [View](https://scan.chiliz.com/token/0x03be2ea82839fbd8b6ab16addeba3fe4c88bb43f) | [View](https://solscan.io/token/GhVytg7CjbJkD4fSSs88p73wiSjRVkd1qxkPPf9whtmJ) | [View](https://basescan.org/token/0x2ce5262866085e5a038a66741e19d32515eb9712)   |
| Everton Football Club            | ![](/files/9auPOTtTh6T8yvoXT5R3) $EFC     | [View](https://scan.chiliz.com/token/0xa84E55C2464563441cb4114372DF8D5aca49Fc83) | [View](https://solscan.io/token/HomA6eCphSyYBEPEEGj8xtjehstxj1B6xE46A78HFPAb) | [View](https://basescan.org/token/0xbb8157c24e1aefa3d98120357286b9fc5f75ca53)   |
| Endpoint CeX                     | ![](/files/7BNUiJeIhzvKLJ7Dxls4) $ENDCEX  | [View](https://scan.chiliz.com/token/0x4cf8426c1d90a505dcb8d96c4f295494a548f4a2) | [View](https://solscan.io/token/64kjfQvxn3NmnjGDCspiiY6zoG4RENzbtSLa4h8AmARA) | [View](https://basescan.org/token/0x7f4630ca69623dff68efa7ae6e635237bccf6794)   |
| Fluminense FC                    | ![](/files/v4KGVnzMut4xTBKULv5i) $FLU     | [View](https://scan.chiliz.com/token/0x9840dc03032f4f35d7dbdc8db832acfaf6ff3e77) | [View](https://solscan.io/token/EHt5kkDVXNy6NRscbDwGkiVjTsuzd88iaGokzJMgKb4F) | [View](https://basescan.org/token/0x9ffc9aa493e1ae0faadb13a7734038bfc390143d)   |
| Fortuna Sittard                  | ![](/files/pKjyrfqPcPahSHjGBD5D) $FOR     | [View](https://scan.chiliz.com/token/0x078b3c0ad7ea92efd14af146bf4171e80ce41e1c) | [View](https://solscan.io/token/AKnvKK4MRa7TNp8w7CE7wnQfFKxNbqm86Z3Czno4p1Eo) | [View](https://basescan.org/token/0x642020c1bc41803cb287cd6753457cc1c4dffc21)   |
| Galatasaray S.K.                 | ![](/files/dFY60asg3au7IzheJ8zQ) $GAL     | [View](https://scan.chiliz.com/token/0x770da1e5dDB22f3Ccc2482493BD9B10A7A8A38Ae) | [View](https://solscan.io/token/EDzhmkPa5gToYGowjH66xycCRgPmfWNzfqpXdCzsYb8M) | [View](https://basescan.org/token/0xdf29de222a4fcf9e5b01028edce0d92f9a72cc6a)   |
| Clube Atlético Mineiro           | ![](/files/1HVFKV8X53zk2hZaG0AU) $GALO    | [View](https://scan.chiliz.com/token/0x558Cc7Ac99793B10c1C142a1C7e5AdF6657DeA9c) | [View](https://solscan.io/token/HJDTyM8uTpdVfW4KSjXJnFXKDVg7czRxDm3d7PJD9PTd) | [View](https://basescan.org/token/0xfdf9877a9b63b05f44b47920a29aeeb515b735d5)   |
| Gaziantep FK                     | ![](/files/FNoPwrlSCgr5taW9quC7) $GFK     | [View](https://scan.chiliz.com/token/0x72b30f41D5163A5082f9461f0B8346789639e063) | [View](https://solscan.io/token/9j3NcycGz2XGPcKckfozu35rZz8gagHcb15CSyCXHcxv) | [View](https://basescan.org/token/0xc75e4c81b2d96f5b9ee4ff9a60b9f09666654dc0)   |
| Goztepe S.K.                     | ![](/files/OoIcHK5Ft9UYSnfWBhEw) $GOZ     | [View](https://scan.chiliz.com/token/0x6ba1FB0dAdAEB34ea24EB31d416805abE8921448) | [View](https://solscan.io/token/HC3jUdgy3r66RPc9hbAq6ia88ARChVPcdxDkCmQJELtt) | [View](https://basescan.org/token/0xec133b2984f7e96cf578abe78f532463c859981f)   |
| Hashtag United F.C.              | ![](/files/HdsHIHSbeZc7q4l5gvJ5) $HASHTAG | [View](https://scan.chiliz.com/token/0x3c1487c5036105338396055d74eee505a9f6a2f3) | [View](https://solscan.io/token/Faq1MPrFgxbAvQH1pqH3rGgK5vKBQWrXNmsG81Pq12SD) | [View](https://basescan.org/token/0xb8a3efa0d7eadc1b1d7610b41514daed79ae9aea)   |
| İstanbul Başakşehir FK           | ![](/files/HaaFJs3aUbrYCanBt1TY) $IBFK    | [View](https://scan.chiliz.com/token/0x7B69003C404B0579F257c16E2664b4Eb4c7b2acf) | [View](https://solscan.io/token/Dqb6YKsEHq6agB5FbMCBnmF3RkthDrC7izBpeSArgXxb) | [View](https://basescan.org/token/0x8644d43161be15689f4730b258ad152019224075)   |
| Inter Milan                      | ![](/files/4W3tUKsvSCJoLQqqlh9t) $INTER   | [View](https://scan.chiliz.com/token/0x1b3385A26214057bB7e27c173ee2D14201752e73) | [View](https://solscan.io/token/HagS3VmAuhx5QJnHcuMAJF4wwVDE58CiX5SFZCYFrVe)  | [View](https://basescan.org/token/0x932ad1cd4a30a34ffca266a85ff7b3e883f6d5e2)   |
| FIGC                             | ![](/files/f9hTTYzBkTAkWnz1ltLM) $ITA     | [View](https://scan.chiliz.com/token/0x90111A53D94efe28F34562b53F04F471522d57b3) | [View](https://solscan.io/token/Gi7tY2BixXnj9XiSFFRFbjJ2h4Su146h6iF4ipALaDuX) | [View](https://basescan.org/token/0x40a4185740561d8ae61a56690b1fc24ed2313b02)   |
| Johor Darul Ta'zim F.C           | ![](/files/DuDVOCroohOdJ27v5PR8) $JDT     | [View](https://scan.chiliz.com/token/0x9af2bd7003f043124aa13a21a2460996f7ba9a3b) | [View](https://solscan.io/token/Bhe7kDxUcW5e51eavqW3fRqtJiHYPDDNYgLjCwwLTegn) | [View](https://basescan.org/token/0x153cb641c3f6b5c8ecdc6c6c2fff77655d2a47a9)   |
| Juventus                         | ![](/files/iJrqx9ntA1XBMmZwqSoH) $JUV     | [View](https://scan.chiliz.com/token/0xeaf368dadc22524def47e8a1c26bfc17ac16e6f5) | [View](https://solscan.io/token/HE6bLNs16qgQo2jVSMXDSCnxQahjdVrww7qQPrHrZtEw) | [View](https://basescan.org/token/0x68504B889978f8f2A7ff0e29CdD8830856e4dCbA)   |
| Legia Warsaw                     | ![](/files/6GTFCFNWLEc55a0ulgoP) $LEG     | [View](https://scan.chiliz.com/token/0xFd8A11532c5Ca9bec64ec86e4E5ed78089CD443f) | [View](https://solscan.io/token/HW1hgpqo5njF5yDGe7tkKEgYzYHmyU4QwizXQs3pgC2G) | [View](https://basescan.org/token/0x068068fb7b3e3e30b9284ca0a40877d8a37a6b34)   |
| Levante                          | ![](/files/UDNukqXxuYeOdnQETTt2) $LEV     | [View](https://scan.chiliz.com/token/0x084Ba7f44Cd799dECDe593A4045170f014c29845) | [View](https://solscan.io/token/4xMWy86qhjMGkWkfbxTtRfiXC1k2WDc8DBfEVuXeUpgh) | [View](https://basescan.org/token/0x6f0185a95ede4c730cb1e55aca5c507adac31a65)   |
| Leeds United FC                  | ![](/files/0MQHE3WooqglouwxQqXT) $LUFC    | [View](https://scan.chiliz.com/token/0xE3ECD48f7653e6da693B544d50caB0BCdCd35C13) | [View](https://solscan.io/token/HLTTFNhUSTPUVfAfNoDLMfjPNuY9fQEr2cNYCvEeLHZS) | [View](https://basescan.org/token/0x23b30697fd4c5f708a4d9c988b2b75e8b5395f2e)   |
| Flamengo                         | ![](/files/UglHOfpztYDHxy9CcKTx) $MENGO   | [View](https://scan.chiliz.com/token/0xBfF8FaBb04f6494fe393EB7416A698869569A310) | [View](https://solscan.io/token/Hf5terE5YuL2e8um8398r6vbsiNcfvwggwUAssgAxeF3) | [View](https://basescan.org/token/0x8269c9930791b0f3339519ab742eb08413beb335)   |
| Millonarios                      | ![](/files/rvOcsK2tMfg3qILTQzou) $MFC     | [View](https://scan.chiliz.com/token/0x580edA966a8129C3c01D149871B47feFcC599D28) | [View](https://solscan.io/token/3FXSFArHJw96KoQjFMc2PCm7hMJPT8gyYLvnnascQQVW) | [View](https://basescan.org/token/0x3fb0035317638d60d36a4e6fd51fe8a90959f0b2)   |
| MIBR                             | ![](/files/7fsPbGSTheTXEJ6VlCZ8) $MIBR    | [View](https://scan.chiliz.com/token/0x8CAf9018Aa56f7Db55bB353005C7aa0FBfb1736b) | [View](https://solscan.io/token/C9fjwEYf3UL1SULNnZAWmKum288wMTSchppCwKwTSAUS) | [View](https://basescan.org/token/0x77a75ee1abf2e14c2892c7d56a53ef657ebb385a)   |
| Napoli                           | ![](/files/TXrcKrgkv7ykG7X8Pkqn) $NAP     | [View](https://scan.chiliz.com/token/0x90593E9602b38A0D5b63d9f34AC3560798cEE7d4) | [View](https://solscan.io/token/BjXGwMnWWUkS9JrXEkkamszu4oX8oqo3kNqFr3ifNk1F) | [View](https://basescan.org/token/0x91870860d41d51263255d93afcd6cb6a2c2d9cab)   |
| Natus Vincere                    | ![](/files/Agi6pcqdTrlU0mxSyv1d) $NAVI    | [View](https://scan.chiliz.com/token/0x02728748392f1875682940681f4c936fc683a68e) | [View](https://solscan.io/token/4NEW5cZGFDjJJe2npyRruHCD9HZ5cZcSoarmECwZ2AfX) | [View](https://basescan.org/token/0x0f633cbc15d438639f29b6559d28cd5941d2c846)   |
| OG                               | ![](/files/CWeerA6pdlg31nZQHd2X) $OG      | [View](https://scan.chiliz.com/token/0xb3f2e39acc68f98229b2587361a8ce30acdf0442) | [View](https://solscan.io/token/BtjXf3LA7Z3jxAcQkKUqKYpLFS5B7GuB7pfjzeas1tdB) | [View](https://basescan.org/token/0xccd6ee493ce30ba25291f563f8b6892af4ba202a)   |
| PERSIB                           | ![](/files/F35SbiAK66qN6lKEMJYi) $PERSIB  | [View](https://scan.chiliz.com/token/0xDD15623d107c639aF0C5127AFFA26d3f20327EC8) | [View](https://solscan.io/token/61CW5BDkhnqr3jSmLAHVa6fPLw7scqJm3qb9kGYdrBC)  | [View](https://basescan.org/token/0x190b55670090abb0a835a37ed10b444771daf275)   |
| PERSIJA                          | ![](/files/kLFHzbZuhhhRBFVtyWJk) $PERSIJA | [View](https://scan.chiliz.com/token/0xdc061856766d4991724307b9b0ea217ff8f3bbee) | [View](https://solscan.io/token/8vuNVRq1MuEtEyPcWXWpciXQRuD1BP8ZvoersHyBeb5)  | [View](https://basescan.org/token/0x49c8ddd9a7c9f2fa6d1b9393b1f0a136c3bb3d4b)   |
| Professional Fighters League     | ![](/files/cRYQdimxe5oG71dzp4za) $PFL     | [View](https://scan.chiliz.com/token/0x3444F5436A3C02F3a3dB8f2436b02BC1EEa950d6) | [View](https://solscan.io/token/xcUwiJe4cfb6VKKyoMkhyqaCeEW8YexXSSxPuswytRm)  | [View](https://basescan.org/token/0xb18f8cede9445487ec478c0b77f82c7314c9b0ab)   |
| Portugal National Team           | ![](/files/RrMpVYmdzJYpfENNlnvM) $POR     | [View](https://scan.chiliz.com/token/0x013F2407c6eF765F1199f8818B805121F269F5b8) | [View](https://solscan.io/token/AiYi7HyVVXnDSuj8BoPirDsuuWgddeKkD5MQN35VpwNz) | [View](https://basescan.org/token/0x00a030340b89eea5dafeebc1da4fe76db374996e)   |
| Paris Saint-Germain              | ![](/files/9F46puzn9N1wd8FyiX8w) $PSG     | [View](https://scan.chiliz.com/token/0xfe1d4a935df7a4a52f835f6104c97af9d72217f2) | [View](https://solscan.io/token/5eyib4qghYGHNh7VvxSFGYLFJSanjq9hug9fR52kksnm) | [View](https://basescan.org/token/0xDD15623d107c639aF0C5127AFFA26d3f20327EC8)   |
| Harlequins                       | ![](/files/xe7qbo0sSvrnpsqrCdYa) $QUINS   | [View](https://scan.chiliz.com/token/0x110A0fC65a0f78840f4b4A04A42e8c285E424553) | [View](https://solscan.io/token/FuwqMR1QynJxzke5toMz3MdQ7dFBxMpLZcggeiYG2Ds)  | [View](https://basescan.org/token/0xf47633605e4a028dd04f1ec0537119d358d42673)   |
| Racing Club                      | ![](/files/B8SARZ3HnhstDUTANwc3) $RACING  | [View](https://scan.chiliz.com/token/0x02300475d1EdD5b2E88EFdeBD3fFb549110D8Aa6) | [View](https://solscan.io/token/HiAuh8bnjeNnv4HWwkzYSKTDyS2jjRTHfsWnbmbyvc97) | [View](https://basescan.org/token/0x3abe33c3f06c14a62d93b92b01dc78780e625dbe)   |
| Roush Fenway Racing              | ![](/files/hBYFgWjucL0ihJ4LGT6G) $ROUSH   | [View](https://scan.chiliz.com/token/0xae0e559cfb64191e376317895f1d643df22d8dd7) | [View](https://solscan.io/token/2QC3rTo9tHYBG6C1WWKbGYsx8XitDu16qKn1Hw4EDWG7) | [View](https://basescan.org/token/0xaa727cf9dfcc406fe8873f077ef7c32544cefc12)   |
| Real Sociedad                    | ![](/files/wJPYXQePfg4RQurs8SrH) $RSO     | [View](https://scan.chiliz.com/token/0x53838837f258f8ef337c8b4ceb60a89190ecba8b) | [View](https://solscan.io/token/EFiyTrx8PtWfDJFNQL5f2R2LK3h7xwMvqY6cAcUxutNQ) | [View](https://basescan.org/token/0xc4524eb22f65f86d9d98c1ce6bccfb7928f3e4f6)   |
| Internacional                    | ![](/files/0xRasX5WntaxyJR2vCRa) $SACI    | [View](https://scan.chiliz.com/token/0x4c360be766dd95c973be30c4130e7b4b762113e0) | [View](https://solscan.io/token/FqDcfNBPM23XaMQ9XRN8Tg9ZEdAtPsHKLStwBCyVcTH3) | [View](https://basescan.org/token/0xfb4037021e785d10b0a02677865b2457cbb3fa47)   |
| South Africa National Team       | ![](/files/rIyHqUAACo22tVgzWgdz) $SAFA    | [View](https://scan.chiliz.com/token/0xf81Aa505Df80278Fc4cF2B050086f678D48bDdCE) | [View](https://solscan.io/token/EwBBVWVueeUagquPM6HqeoE9zCUwdhu5tQCmvWhWbxnH) | [View](https://basescan.org/token/0x73ad4f49753fb877761d68be903b299464f92470)   |
| Samsunspor                       | ![](/files/peYg4grnTOkBAWnmvEox) $SAM     | [View](https://scan.chiliz.com/token/0xf78e9ce916a7d6b3d4facba95b9e9b8bba5df609) | [View](https://solscan.io/token/HzC7pNJ1TGZeEvXMu9mb5r3ynsvKt9VKVq3gX4bsVac5) | [View](https://basescan.org/token/0x7f2f0f3dc03b621645d29b3be369acca9c8cddbf)   |
| Club Santos Laguna               | ![](/files/5vuZ1Bl3BpOFMr9AUaDC) $SAN     | [View](https://scan.chiliz.com/token/0x3BA1eB0FF58537d8b77E8446273295fC432439A9) | [View](https://solscan.io/token/7jPCVLHoybJufYyXtqTQRZ96rksBCFq7zNNELQVP92hC) | [View](https://basescan.org/token/0xb91774f99ed59238516f57e6090bc607551916af)   |
| Saracens                         | ![](/files/3EitBJ1ydY5T3KT9a9lB) $SARRIES | [View](https://scan.chiliz.com/token/0x72b1fca1008be96c4fde2539379c1778a76c4fca) | [View](https://solscan.io/token/8Lsu76xiyf62MKscDezx29cNEFhBWUtmuoX5Vy2HT9f6) | [View](https://basescan.org/token/0x4c51c96b635fcd424240da534feb408a01fdafe6)   |
| Stake F1® Team KICK Sauber       | ![](/files/ueUC9iWi9tBE7po0Umy5) $SAUBER  | [View](https://scan.chiliz.com/token/0xE64c9D1471cFb5e7b03c998AC8137b441c60AF6D) | [View](https://solscan.io/token/FX2XCcCv1qLuSagGgK8oRR7vzb9iyQgaM45DSG7gJQsF) | [View](https://basescan.org/token/0x890351b0f3c49117375ca0e44b2beac055d092a0)   |
| Corinthians                      | ![](/files/mkNxY4iqyKFcdxuJywD3) $SCCP    | [View](https://scan.chiliz.com/token/0x25fb4ff916faFb88d78918c54C1d14B57586046b) | [View](https://solscan.io/token/EFgHaH3va27dKwyUJxDKT76Gx8FVQh3MgUnvKH2fyS8Q) | [View](https://basescan.org/token/0xea47b98cf324af980845fb05aa19ef0ae3ba97d1)   |
| Sevilla FC                       | ![](/files/O50Ygp3SlKYohgzHqMF5) $SEVILLA | [View](https://scan.chiliz.com/token/0xa584cca6a5c46ead6ff8ef3beb8fac76364c36cb) | [View](https://solscan.io/token/DQxhAK6riCdWuYSHUaHxvZbEs7hCGtPfeXxCzn8fp4jo) | [View](https://basescan.org/token/0x6720c4b50ad199400b920a741321c31576d84021)   |
| Scotland                         | ![](/files/1V2pKGsKAVYkVwkg5CHK) $SFA     | [View](https://scan.chiliz.com/token/0xfaB24366503Eb0fa8CB8FB7d1311159FD4283657) | [View](https://solscan.io/token/6mmp4rqjCqhrhdEohPNkTrJaRYxFnTHLXBShBjb48puG) | [View](https://basescan.org/token/0xc1b5923ed0e1026e3590bac30de5611ffcb71a68)   |
| Stade Français Paris             | ![](/files/OkqwV22TBYzbLYebBT1a) $SFP     | [View](https://scan.chiliz.com/token/0x04aa2d5c46691f05d30b9e65a9e09c8ea383c7b0) | [View](https://solscan.io/token/75bLB7frmaDXoVBJoeEeC6LdRxa6QusEZs5znGGGAzXN) | [View](https://basescan.org/token/0x40d93351dc90787db2a00867854197da43eb3299)   |
| Sharks                           | ![](/files/cSXSzJa5QP3lXAGUJgSB) $SHARKS  | [View](https://scan.chiliz.com/token/0x0cb13408921f87e3a3d011b03935a81a1542bdfa) | [View](https://solscan.io/token/Hhj1BWuQ2iB123XT5RCnPJX6SamPzx6uvu39pRRRJBMh) | [View](https://basescan.org/token/0x3c6467fcde170d374fd84d4a699c165860242e46)   |
| Spain                            | ![](/files/TR59jBJXcWXf3qqLxugr) $SPAIN   | [View](https://scan.chiliz.com/token/0x7A224b67aAA360e48402AAb4Ff12D89eEF9b4cF8) | [View](https://solscan.io/token/5J66Ept1vhnkdWy96SFGRFkABJLu6372NoGQ4Jvnm1QF) | [View](https://basescan.org/address/0x6751b1a8b117dd02a212e46f208079f0328e60e3) |
| São Paulo FC                     | ![](/files/KtMAfyh0o1UaNcqObDin) $SPFC    | [View](https://scan.chiliz.com/token/0x6345c0ECcA1B9007a9043CB5da8150aE07adD498) | [View](https://solscan.io/token/25vvHsXtKnnBtno1otYJzcdVcoxR7bGqWR7FZEZh9CXn) | [View](https://basescan.org/token/0x69346879e81f20ec280944d4e363fb362bee7259)   |
| Tottenham Hotspur                | ![](/files/BFeQMpfyBl0y9RmTBNnl) $SPURS   | [View](https://scan.chiliz.com/token/0xd699ACD21011c20381E5138A430bb0d7b6E9BC7F) | [View](https://solscan.io/token/GDNoEjfSAUAvManoEaT3vStGcvwKkcUcSTvUwfvwhqXf) | [View](https://basescan.org/token/0xbc338400bbcfb75c671c048b4fb9ea5fb2447b76)   |
| Sint-Truidense Voetbalvereniging | ![](/files/IEUiA8qlusUPTSNasN3B) $STV     | [View](https://scan.chiliz.com/token/0x71bc882c60b9efdf85d0e1a28fc86f0bd822132f) | [View](https://solscan.io/token/5RhF74yi3uGHjzUjVBqtkCAbsNg8PM6KgL7B85UYM2SN) | [View](https://basescan.org/token/0xc2c139f89a3e4af9072519cfd650085007ee73c1)   |
| Team Heretics                    | ![](/files/DRWQVmKkPaieFGcLNQKz) $TH      | [View](https://scan.chiliz.com/token/0x0b5De9e1303F3FB4F67D1ACA1503DDB28Bf59834) | [View](https://solscan.io/token/FiVKSsRESfpevpLREzDiudTzryFQ58uUzmB9P5YwbcNS) | [View](https://basescan.org/token/0xc0abd49fb1abcfc0aedd4f21633437dded3231b4)   |
| Leicester Tigers                 | ![](/files/OGr98zhfRRv2ZvfACLWV) $TIGERS  | [View](https://scan.chiliz.com/token/0xc430ffb62961ff910181edcae34ae9fc418a15ce) | [View](https://solscan.io/token/4foTjmAeoN4RLz5iAWS9FPgTpdtcLzabGExCZJpbrT2P) | [View](https://basescan.org/token/0xa7600ea5b0f4262eeeae5af49c76fdae0844a0ad)   |
| Trabzonspor                      | ![](/files/9wpr2p2IaJJIoCYeUnsu) $TRA     | [View](https://scan.chiliz.com/token/0xEff432433Dd57AdFA37004af00DB148F9407e7bD) | [View](https://solscan.io/token/AMnbxhGifp3gm2YsNwmfcF2ZCLsZN6iP3LdzBPZgGpzW) | [View](https://basescan.org/token/0x1c4be68787a4f186f2a3702c45ff6b13802646e4)   |
| Universidad de Chile             | ![](/files/lWTswDRnd8AJvzpRCDbt) $UCH     | [View](https://scan.chiliz.com/token/0xfe050a08699a2557bcc0a8e6c2805eba55d61065) | [View](https://solscan.io/token/89nUf6DFzukM3jdr73D2JdVT3Z7qZzwNnC4huaxyW8p9) | [View](https://basescan.org/token/0xeda5ab1ac1bb283ee22aa08b9ed1d7e27824ac09)   |
| UFC                              | ![](/files/PInfYQSxwNKWwEZ3g2tm) $UFC     | [View](https://scan.chiliz.com/token/0xc9f723625e80a81cba2cad3e6871d3bdf2a7ecc7) | [View](https://solscan.io/token/FG44Jffowai8hqQifkwtNLbADkH3EjG5txMc54yaJ4cN) | [View](https://basescan.org/token/0x9fb34542aaba9b0bed49913c7daff7f74e77a18b)   |
| Vasco da Gama                    | ![](/files/HUKmcVeRy4eEWwGHMd5s) $VASCO   | [View](https://scan.chiliz.com/token/0xd5f1b2454db115967bfac73bfea21da5e2543c8e) | [View](https://solscan.io/token/4nQBeMMsLJXfFQRS5VnLxCCk74iVguJMhZ2etSHq1nFz) | [View](https://basescan.org/token/0x3a45dd104e5aa792d7aff0d2a942450358e291fc)   |
| Valencia CF                      | ![](/files/XpbsN38GzDcsX9xCBIzy) $VCF     | [View](https://scan.chiliz.com/token/0x83d7d1df01c698b4379077af4bceb2d4af113bff) | [View](https://solscan.io/token/9gui2Z9dzatiJAapRd5R9CkfD5BUFot5dJppijZRQ2gA) | [View](https://basescan.org/token/0x45020Ec5119A3FB54eBDFeFCC6674319C615d0AA)   |
| Palmeiras                        | ![](/files/kxRj41tDVTVymw7l7blN) $VERDAO  | [View](https://scan.chiliz.com/token/0xb46357d8ed050d35d3a24154c39d7236dae86187) | [View](https://solscan.io/token/5qBMrbPx1CUbmqc87THJhWPy6aUkywkU3DdREqXgZ23W) | [View](https://basescan.org/token/0x35a8615686940935b1f8b6e39b62ac1ca063f905)   |
| BSC Young Boys                   | ![](/files/XuMQY8EkcEgc3NAAXN5f) $YBO     | [View](https://scan.chiliz.com/token/0x8c4d631a673be24f244e4f0645be6928d0083d4e) | [View](https://solscan.io/token/BUYgeUDgnRxnu9G5sPyoHwigTL4PrqMSd4LURwH1KE4G) | [View](https://basescan.org/token/0x5bfde298f8dd600783eed0bfb10ccf3bf5426847)   |


# Learn

Conceptual guides covering Chiliz Chain architecture, CHZ tokenomics, bridging, staking, validators, Fan Tokens, stablecoins, DAOs, and wallets.

This section is aimed at people who want to learn more about the concept and theoretical knowledge behind Chiliz Chain.

{% content-ref url="/pages/KBGWJbAZZVZwn2gEC853" %}
[About Chiliz Chain](/learn/about-chiliz-chain)
{% endcontent-ref %}

{% content-ref url="/pages/LqkVo2xmi02KJyykaFpT" %}
[Tokenomics](/learn/about-chiliz-chain/tokenomics)
{% endcontent-ref %}

{% content-ref url="/pages/PW2dnfj0G6myUxkb8vGi" %}
[Chiliz Greenhouse](/learn/about-chiliz-chain/chiliz-greenhouse)
{% endcontent-ref %}

{% content-ref url="/pages/IHjqPndNiDWHZkFQts9P" %}
[About Bridging](/learn/about-bridging)
{% endcontent-ref %}

{% content-ref url="/pages/3vn1Qkqo3TvPfmN1OSkb" %}
[About Staking](/learn/about-staking)
{% endcontent-ref %}

{% content-ref url="/pages/pq0KCntHnotkmXuEuC3W" %}
[About Validators](/learn/about-validators)
{% endcontent-ref %}

{% content-ref url="/pages/DUqAvWtmu3FJYbH3fPN4" %}
[About Fan Tokens](/learn/about-fan-tokens)
{% endcontent-ref %}

{% content-ref url="/pages/Uu9QoX1dgGkoU4ZiUMQN" %}
[About Stablecoins](/learn/about-stablecoins)
{% endcontent-ref %}

{% content-ref url="/pages/UOF66lNGUCyfLbNcLNWu" %}
[About DAOs](/learn/about-daos)
{% endcontent-ref %}


# About Chiliz Chain

Chiliz Chain fundamentals: EVM compatibility, PoSA consensus, Parlia engine, CHZ native token, validator set, and sports-and-entertainment ecosystem focus.

## **Prime objective of Chiliz Chain**

Chiliz Chain aims to build a secure online community focused on sports and entertainment.

Our prime objective is to create a Web3 ecosystem focused on the Sports and Entertainment industry where stakeholders are able to build Web3 experiences within a secure network-effect-driven community.

With Chiliz Chain, you can access global brands and leverage a huge existing partner of sports and entertainment properties to create something special.

## Key features

### EVM compatibility

Chiliz Chain is a fork of [BNB Smart Chain](https://www.bnbchain.org/en/bnb-smart-chain) ([BSC](https://github.com/bnb-chain/bsc)), which is itself a go-Ethereum fork.

Hence, most of the EVM mechanisms, concepts, and binaries, including this documentation, are derived or inspired from the BSC and Ethereum ones.

As an EVM-compatible chain, Chiliz Chain will stay compatible with the Ethereum tooling, making it simple and easy for knowledgeable developers to build in the Chiliz Chain environment.

### Proof of Staked Authority consensus

As a fork of BSC, Chiliz Chain relies on Proof of Staked Authority consensus (PoSA), which combines Proof-of-Authority (PoA) with Proof of Stake (PoS). This hybrid algorithm facilitates faster block times and reduced transaction costs but at the expense of decentralization.

This also means that Chiliz Chain inherits the following from the [BSC consensus mechanism](https://github.com/bnb-chain/bsc/blob/master/README.md#proof-of-staked-authority), Parlia:

1. Blocks are produced by a limited set of validators.
2. Validators take turns to produce blocks in a PoA manner, similar to Ethereum's Clique consensus engine.
3. Validator sets are elected in and out based on the staking governance on the Chiliz Chain.
4. Parlia consensus engine interacts with a set of system contracts to achieve a liveness slash, revenue distribution, and the validator set renewal function.

PoSA encourages decentralisation and favours community governance. It also supports shorter block time and lower fees.

### Limited number of validators

From that baseline of the EVM compatibility, Chiliz Chain introduces a system of Main Validators. The most bonded validator candidates of staking become the validators and start producing blocks.

### Native token: CHZ

CHZ is the native token, which runs on Chiliz Chain, exactly the same way ETH runs on Ethereum.

This means that CHZ can be used to:

1. pay gas to deploy or invoke smart contract,
2. perform cross-chain operations, such as transfer token assets across Chiliz Chain and Ethereum,
3. secure the network by staking or delegating it.


# Tokenomics

Chiliz Chain Tokenomics 2.0: 8.80% initial inflation with exponential decay to 1.88% floor, EIP-1559 fee burning, validator/delegator reward split, and Pepper8-updated supply roadmap.

## Chiliz Chain Tokenomics 2.0 🌶️✨

The Chiliz Chain new tokenomics were introduced with the [Dragon8 hard fork](/chiliz-chain-changelog/governance-proposals-and-decisions/2024-dragon8-hard-fork-announcement) in 2024, and upgraded with the [Pepper8 hard fork](/chiliz-chain-changelog/governance-proposals-and-decisions/august-2025-pepper8-proposal) in 2025.

<figure><img src="/files/629LlR5hb2tkuYdZCroi" alt=""><figcaption></figcaption></figure>

Since the release of Chiliz Chain 2.0 in May 2023, we’ve gained valuable insights into the evolving economic dynamics of our $CHZ token. As a “simple” transactional token initially, $CHZ has matured into the foundation of our ecosystem’s governance and gas token of an active, sovereign protocol. Despite all the significant progress, it has become evident that the original tokenomics can no longer meet the demands of our expanding ecosystem.

Thus at the start of 2024, we introduced our upgraded tokenomics model, featuring **a gradually decreasing annual inflation rate and a perpetual token burn mechanism**.\
We further refined the tokenomics in August 2025.

## So, why the upgrade? 🤔️

Under the tokenomics 1.0, the protocol restricts capacity to bootstrap long-term incentives for our community in exchange for broad participation in governance and security. It also precludes the ability to bootstrap long-term incentives for community & ecosystem participation more broadly - whether this comes in the form of liquidity pool incentives for nascent Chiliz Chain-native DEXs, incentives to stake emerging Chiliz Chain-native community tokens, or the like. This strategic shift will align Chiliz with the economic strategies of leading Layer 1 protocols worldwide, enhancing the $CHZ token utility and ensuring its longevity in our ecosystem.

Gaining a thorough understanding of Chiliz Chain's tokenomics 2.0 is essential for making informed decisions. Below, we provide a comprehensive overview of the inflation mechanism, outlining key details such as the initial annual base, the decreasing year-over-year inflationary decay, and the allocation of the inflationary portion.

## Tokenomics 2.0 Mechanism Specifics ⚙️

* Initial (year 1) annual base inflation: **8.80%**
* Decreasing year over year inflationary decay (using the **Formula below**)
* Annual inflation stagnation (inflation floor) in 14 years: **1.88%**
* Transaction Fee Burning Mechanism: The Chiliz Chain will implement [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) wherein the vast majority of accrued gas fees will be burned at a protocol level.

### Formula

The updated tokenomics of the Chiliz Chain introduces a carefully crafted inflation formula that adjusts the annual inflation rate of the $CHZ token.

The formula is: `y = 9.24e(-0.250x) + 1.60`, which features a decreasing inflation model that reduces inflation swiftly in the early years. The coefficient 9.24 shows the initial magnitude of inflation decay while the decay rate of 0.250 determines the pace at which the inflation rate decreases. The offset of 1.60 adjusts the long term asymptote of the inflation curve, stabilizing the inflation rate at 1.88% annually after 14 years.

<figure><img src="/files/TRRODZZ5wtgPA9jSsymU" alt=""><figcaption></figcaption></figure>

Where:

* **y** = inflation percentage (%)
* **x** = year of inflation (or time elapsed, denoted in years)\
  9.24 = The coefficient affecting the initial magnitude of the decay\
  0.250 = The decay rate\
  1.60 = The offset that adjusts the asymptote the function approaches over time\
  Under the condition that when **x** >13, **y** = 1.88%

### Supply Roadmap

This table follows the new roadmap established with the Pepper8 hard fork in 2025.

| Year | Initial Supply | Inflation | New Introduced Supply | New Total Supply |
| ---- | -------------- | --------- | --------------------- | ---------------- |
| 1    | 8,888,888,888  | 8.80%     | 781,877,265           | 9,670,766,153    |
| 2    | 9,670,766,153  | 7.20%     | 845,315,193\*         | 10,516,081,346   |
| 3    | 10,516,081,346 | 5.530%    | 581,591,225           | 11,097,672,571   |
| 4    | 11,097,672,571 | 4.654%    | 516,527,870           | 11,614,200,441   |
| 5    | 11,614,200,441 | 3.967%    | 460,778,406           | 12,074,978,847   |
| 6    | 12,074,978,847 | 3.430%    | 414,122,686           | 12,489,101,533   |
| 7    | 12,489,101,533 | 3.009%    | 375,820,940           | 12,864,922,473   |
| 8    | 12,864,922,473 | 2.85%     | 366,714,360           | 13,231,636,833   |
| 9    | 13,231,636,833 | 2.57%     | 340,567,623           | 13,572,204,456   |
| 10   | 13,572,204,456 | 2.36%     | 320,095,744           | 13,892,300,200   |
| 11   | 13,892,300,200 | 2.19%     | 304,337,709           | 14,196,637,909   |
| 12   | 14,196,637,909 | 2.06%     | 292,455,356           | 14,489,093,265   |
| 13   | 14,489,093,265 | 1.96%     | 283,736,100           | 14,772,829,365   |
| 14   | 14,772,829,365 | 1.88%     | 277,584,983           | 15,050,414,348   |
| +    | +              | 1.88% ∞   | +                     | +                |

{% hint style="info" %}
`*` : Year 2 includes a one-time supply addition following [the Paribu Net merge](/chiliz-chain-changelog/governance-proposals-and-decisions/august-2025-pepper8-proposal#deactivation-of-paribu-net) ($PRB → $CHZ conversion, Pepper8, August 2025).
{% endhint %}

Inflation will stabilize at an annual rate of 1.88% starting from the 14th year. Over time, this inflationary pressure will be partially offset as the volume of gas fee burn increases. Eventually, if the gas fee burn rate surpasses the annual inflation rate, the inflation could naturally turn negative and the model will become deflation.

*To understand this better, take a look at the visualization of the inflation rate model below.*

{% hint style="info" %}
**Inflation Supply Allocation:**

* Validators/Delegators: **65%**
* Community Vault, $CHZ LP (liquidity provider) and possible Shared Security Restaking Rewards: **10%**
* Ecosystem and Operational (E\&O) Distribution: **25%**
  {% endhint %}

## Key Advantages of the Upgraded Chiliz Chain Tokenomics

The introduction of the new tokenomics for the Chiliz Chain is a significant evolution in our ecosystem. It ensures CHZ tokens remain a vital component of our network. The upgrade is a strategic realignment for sustainable growth, community engagement, and enhanced token utility. Here are the key advantages:

1. **Incentivizing community participation** with higher rewards
2. **More sustainable growth** for the Chiliz Chain ecosystem - this will allow long term incentives for all the participants of the broader Chiliz Chain ecosystem.
3. **More opportunities for DeFi building** within Chiliz Chain ecosystem

Long-term ecosystem funding - as a portion is allocated to the Ecosystem and Operational (E\&O) Distribution, we’re making sure to continuously fund the development of Chiliz Chain, ecosystem projects, and community initiatives.

*Still have more questions about Chiliz Chain Tokenomics 2.0?*\
\&#xNAN;*Check out our FAQ section 👇*

## Audit report by Halborn

You can read the full audit report by Halborn here:

{% embed url="<https://www.halborn.com/audits/chiliz/chiliz-tokenomics>" %}

## FAQ

### What is the purpose of introducing an inflation model to the Chiliz Chain?

The original Tokenomics 1.0 limits our ability to offer long-term incentives for community participation in governance and security, as well as broader ecosystem involvement. By upgrading, we align Chiliz with global Layer 1 protocols, enhancing $CHZ utility and ensuring ecosystem longevity.

### What annual yield can validators/delegators expect from the new mechanism?

Annual yield for validators and delegators from inflation mechanism projected at minimum 5.72% APY (100% supply staked) and median/average 11.44% APY (50% supply staked). Yield adjusts based on actual staking participation rates and inflation rate over time.

### What is the initial annual base inflation rate for the Chiliz Chain?

The initial (year 1) annual base inflation is set at 8.80%, with a front-loaded decreasing year-over-year inflationary decay formula applied thereafter.

### How will inflation change over time?

Chiliz Chain's inflation starts at 8.80% on day one, then decreasing with a front-loaded year-over-year inflationary decay formula until it reaches 1.88% in the 14th year. It remains static from the 14th year. This approach balances high initial incentives with long-term sustainability. For a more visual display, please see our table above.

### How is the inflation supply allocated? What will be the distribution among validators/delegators and the community?

Here's the allocation breakdown:

* 65% of the inflation supply is for validators and delegators as a reward for their participation in network governance and security;
* 10% to Community Vault/$CHZ Liquidity Pools/Shared Security Restaking Rewards;
* 25% to Ecosystem and Operational Distribution, such as funding Chiliz Chain development and supporting ecosystem projects.

### Can I monitor the wallet used for inflation supply allocation?

Of course! For transparency and monitoring purposes, you can and should keep track of the wallets used for inflation supply allocation.

Here is the page listing the addresses of the wallets used to allocate Inflation Supply:

{% content-ref url="/pages/pntXW13Q9weIyJKdyx0f" %}
[Inflation Supply Allocation Addresses](/quick-start/inflation-supply-allocation-addresses)
{% endcontent-ref %}

### Will the $CHZ token supply keep inflating under the Tokenomics 2.0?

The inflation rate will keep decreasing year over year with an inflationary decay, and stabilize at an annual rate of 1.88% starting from the 14th year. Over time, this inflationary pressure will be partially offset as the volume of gas fee burn increases. Eventually, if the gas fee burn rate surpasses the annual inflation rate, the inflation could naturally turn negative and the model will become deflation.

### What are the long-term security implications of the new tokenomics for Chiliz Chain?

Chiliz Chain's new tokenomics uses a balanced approach of inflation and burning to incentivize a broad and active validator set, making the network more decentralized and attack-resistant. This helps maintain a sustainable economic model and prevents excessive inflation. Together, these mechanisms create a secure and adaptive ecosystem for us.


# Security Audits

Security audit reports for Chiliz Chain's governance contracts, Fan Token contract, Chiliz Bridge, and Tokenomics by Certik and Halborn.

To keep Chiliz Chain secure and trustworthy, we've had several security audits done by industry-leading firms.

These include checks on our Governance Contracts, Fan Token Contract, Chiliz Bridge, and Tokenomics. Each audit dives deep to make sure everything works smoothly and securely.

Here are the links to all the security audits we’ve completed for the Chiliz Chain.

## Audit for Chiliz Chain Governance Contracts

{% embed url="<https://skynet.certik.com/projects/chiliz>" %}

## Audit for Fan Token Contract

{% embed url="<https://skynet.certik.com/projects/chiliz>" %}

## Audit for Chiliz Bridge

{% embed url="<https://www.halborn.com/audits/chiliz/bridge-updates-smart-contract-security-assessment>" %}

## Audit for Tokenomics

{% embed url="<https://www.halborn.com/audits/chiliz/chiliz-tokenomics>" %}


# Chiliz Greenhouse

Chiliz Greenhouse program: micro-grants, technical bounties, and mentorship for builders, plus the Greenhouse Hub showcase for SportFi projects.

As the home of SportFi, Chiliz Chain wants you to be successful, and has built the tools to help you fund your ideas, and showcase them.

## Chiliz Greenhouse

Chiliz Greenhouse is the space for builders, developers, and creators.

{% embed url="<https://greenhouse.chiliz.com/>" %}

It is a reward and incentive platform designed solely to fuel the creation of the Chiliz ecosystem.\
If you have the skills to contribute code, promote Chiliz, or provide feedback, this is your workspace.

Chiliz is targeted at the community:

* Access micro-grants, technical bounties, and creative content tasks.
* Get paid in $CHZ for your contributions (from fixing bugs to launching full-scale dApps).
* Work under the guidance of the Chiliz core team with mentorship that accelerates your project from concept to launch.

## Chiliz Greenhouse Hub

If the Greenhouse is where the work happens, the Hub is where the world sees it.

{% embed url="<https://greenhousehub.chiliz.com/>" %}

The Greenhouse Hub is the SportFi center that empowers the Chiliz community to discover what is being built. It is the connective tissue between the workspace and the expanding developer community.

The Hub is where you can:

* Browse a curated list of active bounties, projects, and community rewards.
* See the latest cutting-edge projects in Sports, NFTs, Esports, AI, and DAOs.
* Find your Web3 niche and be rewarded for engaging with the next big thing in sports.


# About Wallets

Overview of Web3 wallets for Chiliz Chain: MetaMask browser extension, Safe multisig, and Socios.com Wallet for Fan Token interactions.

{% hint style="success" %}
A Web3 wallet serves as both storage for your CHZ tokens, and as your digital signature to approve on-chain actions.
{% endhint %}

Every transaction on Chiliz Chain, whether it’s minting an NFT, transferring tokens, or participating in community governance, requires a secure Web3 wallet solution.

Wallets allow you to store, manage, and control your private keys, which are crucial for safeguarding your assets and verifying your transactions on the blockchain.

In the Chiliz ecosystem, you can use a variety of wallets to meet your requirements.

Just to name a few:

* [MetaMask](https://metamask.io/) is a popular browser extension that integrate with decentralized applications
* Multisig wallets, such as [Safe](https://safe.global/), add an extra layer of security for collaborative transactions
* The [Socios.com Wallet](https://www.socios.com/new-socios-wallet-upgrade/) is specifically built for fan-centric interactions.

Different wallets cater to different needs, whether you’re an individual investor, a developer, or an organization managing large-scale transactions. Each type offers a unique combination of features to help you get the most out of your Chiliz experience.

See more:

{% content-ref url="/pages/7jmbvsuzJaARscErNwWb" %}
[How to use MetaMask](/learn/about-wallets/how-to-use-metamask)
{% endcontent-ref %}

{% content-ref url="/pages/KV7mXiILht28yRbzyYDU" %}
[How to use a multisig wallet (Safe)](/learn/about-wallets/how-to-use-a-multisig-wallet-safe)
{% endcontent-ref %}


# How to use MetaMask

Step-by-step guides to install MetaMask and connect it to Chiliz Chain Mainnet and Spicy Testnet, with seed phrase safety warnings.

{% hint style="warning" %}
**CAUTION**

MetaMask is the most popular Web3 wallets. As such, it is more prone to online scams, cyber-attacks, or hacks. That is why you must keep your **seed phrase** safe at all times.

To prevent hacking, we recommend you to **not** save your MetaMask seed phrase on your computer or any handheld device. The most recommended way is to write the seed phrase on a physical piece of paper, and store that paper in a safe place that only you can access.

***The Chiliz team will NEVER ask you for your password or seed phrase.***
{% endhint %}

{% content-ref url="/pages/sX0yak7ql3J63wsGoMHc" %}
[Install MetaMask](/learn/about-wallets/how-to-use-metamask/install-metamask)
{% endcontent-ref %}

{% content-ref url="/pages/tzJomHxArA5lwaA7IFvl" %}
[Link Chiliz Chain and MetaMask](/learn/about-wallets/how-to-use-metamask/link-chiliz-chain-and-metamask)
{% endcontent-ref %}


# Install MetaMask

Install the MetaMask browser extension from the Chrome Web Store to create and manage a Web3 wallet for Chiliz Chain.

Follow the steps to download the MetaMask web extension and use your MetaMask Wallet thereafter.

1. Visit the [<mark style="color:blue;">MetaMask</mark>](https://metamask.io/) website, and click "Get MetaMask".

<figure><img src="/files/l2nRGipjOsBBo0vprCNA" alt=""><figcaption></figcaption></figure>

2. Select "Install MetaMask for Chrome".

<figure><img src="/files/RQKiAiAtsqGqHzJSSJQE" alt=""><figcaption></figcaption></figure>

You will be redirected to the Chrome Web Store. Click the "Add to Chrome" button.

3\. Read the disclaimer carefully and then select **Add extension**.

![](/files/pxKHtGOHyzrTvNqyhzG6)

4\. Select **Get Started**.

![](/files/a9DsMhb6v4pV1bepv4hw)

5\. Provide your consent by clicking on the **I Agree** button.

![](/files/BMkq5rMxoGszHUmXDhlX)

6\. Assuming that you are brand new to the MetaMask, click on the **Create a Wallet** button.

![](/files/RwoH6Gk4scHDnSWaSU74)

7\. Ensure you choose a complex password in the interest of better security of your account. Select the ✅ checkbox after reading the *Terms of Use.* Click **Create**.

![](/files/uT9LtTHvhHOijX0cSthD)

8\. It is recommended to watch the video on how to *Secure your wallet* before you proceed further. Click **Next**.

![](/files/ouIaJHINXinNMT2aAmMC)

9\. Unveil the Seed Phrase by clicking on the *Lock* 🔒 icon.

![](/files/E1llX5xydRXCm2S7Mzrc)

{% hint style="info" %}
**What is a seed phrase?**

A seed phrase is a series of 12 to 24 random words assigned to your account to be used as a private key to access your wallet (account) when required.
{% endhint %}

{% hint style="danger" %}
**CAUTION**

Keep your wallet safe from the perils of the crypto world! Do not unveil your seed phrase in anyone's presence or share it with anybody under any situation.

Do not store your seed phrase on any digital third-party application, or handheld device; they are more likely to get stolen or hacked.\
In general, do not store your seed phrase on an online service, and do not store in a local file either.

Instead, write the seed phrase on a piece of paper and keep it in a secret place, such as a safety box. You can also rely on a metal backup tool, such as Ledger's Cryptosteel Capsule.
{% endhint %}

10\. After noting down the seed phrase, click **Next**.

![](/files/krVECvZLIH5Bdr8kAyg0)

11\. You will see your seed phrase arranged arbitrarily. You must arrange the seed phrase in the exact sequence you have received using the empty box. Verify the entered seed phrase again before you select **Confirm**.

![](/files/D3RAHpsOucTWOrBPLe9G)

12\. After arranging the seed phrase in the given order you will see the following notification indicating that you have successfully created a MetaMask Wallet. Click **All Done**.

![](/files/mWO4wfHmYr6jc9NfZSdn)

13\. Your MetaMask Wallet is now ready for use!

![](/files/HBsJiuAbNNIaHPiRpO0x)

{% hint style="info" %}
By default, your MetaMask Wallet is connected to the Ethereum network.\
You must [<mark style="color:blue;">connect your wallet to the Chiliz Chain network</mark>](/learn/about-wallets/how-to-use-metamask/link-chiliz-chain-and-metamask) manually.
{% endhint %}


# Link Chiliz Chain and MetaMask

Add Chiliz Chain Mainnet and Spicy Testnet as custom networks in MetaMask using RPC URL and chain ID configuration.

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

1. This topic assumes you have already installed MetaMask on your system. If not, please [install MetaMask](/learn/about-wallets/how-to-use-metamask/install-metamask) (either the Chrome-based extension or the mobile app) first.
2. For your convenience, pin 📍 the MetaMask extension to your preferred browser:

<figure><img src="/files/RLjk9nQ35c2rjZFLVvZB" alt="" width="324"><figcaption></figcaption></figure>

## Steps to connect your wallet

{% hint style="info" %}
You can also use MetaMask's own documentation:\
<https://support.metamask.io/configure/networks/how-to-add-a-custom-network-rpc/>
{% endhint %}

To connect your MetaMask wallet to Chiliz Chain Mainnet or Testnet, do the following:

1. Click on the **MetaMask** icon to open your wallet (it will ask you to type your password).

<figure><img src="/files/AV9tRo9Flp1MpWbFRxBh" alt="" width="102"><figcaption></figcaption></figure>

2. By default, your is connected to Ethereum Mainnet. Click on the dropdown menu to expand it, and select **Add Network**. This will open the MetaMask settings page in the "Networks > Add a network" section.

<figure><img src="/files/9gkZ0WgJMkNE9KDB0DFj" alt="" width="375"><figcaption></figcaption></figure>

3. On the "Add a network" page, click "Add a network manually", and use the form to enter the relevant values in the respective fields of your MetaMask account.\
   \
   For your copy-paste needs, the parameters for Chiliz Chain Mainnet and Spicy Testnet are available here: [Connect using RPC](/develop/basics/connect-to-chiliz-chain/connect-using-rpc).<br>

   <figure><img src="/files/zR1QSUrsXTRRqBAXT311" alt=""><figcaption></figcaption></figure>
4. Click **Save**.

{% hint style="success" %}
The "Save" button is enabled only when the form is filled correctly using the provided values.
{% endhint %}

The green checkmark ✅ indicates that you have successfully linked your MetaMask account to Chiliz Chain Mainnet. Now you can start exploring, customising, and using CHZ with your MetaMask Wallet.

{% hint style="info" %}
You need to perform these steps once for Chiliz Chain Mainnet, and once for Spicy Testnet.\
Configuring one network does not imply that the other one is also configured: You have to do both within MetaMask.
{% endhint %}


# How to use a multisig wallet (Safe)

Set up and use a Safe (Gnosis Safe) multisig wallet on Chiliz Chain at safe.chiliz.com, deployed by Protofire, for multi-signature institutional asset management.

[Safe](https://safe.global/) (formerly Gnosis Safe) is a secure multisig wallet solution.

{% hint style="info" %}
A multisig (multiple-signature) wallet is a smart contract-based wallet that requires a predefined number of signatures (e.g., 2 out of 3) to approve transactions. This extra layer of security is especially useful for managing funds that need consensus from multiple parties.

For more details, visit [Safe’s official website](https://safe.global/) or [Protofire's own overview](https://protofire.io/services/solution/safe-deployment).
{% endhint %}

Thanks to our partner [Protofire](https://protofire.io/), Safe is now coming to the Chiliz Chain! See [safe.chiliz.com](https://safe.chiliz.com/) to connect your wallet and create a Safe account!

Below is a quick guide to help you create and manage a multisig wallet using Safe.

## Creating a Multisig Wallet

1. Go to Chiliz's [Safe page](https://safe.chiliz.com/welcome).
2. Click "Connect Wallet" and pick the supported wallet that you use, for instance MetaMask. Follow you're wallet's instructions to connect the two together.
3. The "Create new Safe Account" page appears, with various steps:

<figure><img src="/files/j30ihkgOm6eRzEPhJBjR" alt=""><figcaption></figcaption></figure>

* Here are the sections:
  1. "Set up the Basics": Name your wallet and select the networks it should be active on. In our case, depending of your usage, you can choose either Chiliz Chain Mainnet for everyday operations, or Spicy Testnet if you need to test a dApp.
  2. "Signers and confirmations": Indicate the wallet addresses of each owner, and how many owner signatures are required to approve transactions (for instance, 2 out of 3).
  3. "Review": Make sure everything is in place! Also, choose when you'd like to pay the transaction fee (either right now or on your first interaction).

4. Click "Create Account".

<figure><img src="/files/5lcGY9CRUdfbpvuKRpgF" alt="" width="375"><figcaption></figcaption></figure>

You are then redirected to your Chiliz Safe dashboard. Two steps are needed to complete the creation process:

* Add CHZ to you Chiliz Safe wallet (in order to pay for gas fees).
  * See the "Depositing Funds" section below.
* Activate the account:
  1. Click the "Activate now" button in your Chiliz Safe dashboard
  2. In the "Activate account" page that opens, click "Activate". If you have set a minimum threshold, you will need to have other owners to activate the account too.
  3. Confirm the transaction (and check its gas fees!) in the modal window that your connected wallet (eg. MetaMask) opens.
  4. After a couple of minutes, your dashboard should indicate that your Chiliz Safe account is activated.

Congratulations! You can now start using your Chiliz Safe multisig wallet!

## Depositing / Receiving Funds

1. In the [Chiliz Safe interface](https://safe.chiliz.com/), locate and copy your Safe’s unique address (in the menu on the top right).

* Also, clicking the "Receive" button (or the "Add funds" one if you're getting started) displays a modal window with a QR code and an address.

2. Use your existing wallet (or a decentralized exchange) to send Chiliz Chain-compatible tokens to your Chiliz Safe address.\
   For instance, using MetaMask:
   1. Copy the Safe address to the clipboard.
   2. Open MetaMask and click its "Send" button.
   3. Paste the address in MetaMask's "To" field.\
      Be sure to remove the `chzmainnet:` prefix, otherwise you'll get a "No resolution for domain provided" error.
   4. Enter the amount of CHZ you want to deposit, and click MetaMask's "Continue" button.
   5. MetaMask displays one last screen where you can review your deposit: check both `From:` and `To:` addresses, and the amount! Also, make sure that you have enough CHZ in your MetaMask wallet to pay for the network fee ("gas fee").\
      Click "Confirm".
   6. MetaMask should display a notification once the transaction is confirmed.
   7. The tokens will show up in your Safe balance as soon the transaction is confirmed on Chiliz Chain.

## Withdrawing / Sending Funds

To send CHZ from your Chiliz Safe account to any wallet that supports Chiliz Chain:

1. Click the "Send" button from your Chiliz Safe dashboard.
2. Copy the adress from your target wallet and paste it in the "Recipient address" field, next to the `chzmainnet:` prefix.
3. Indicate the amount of CHZ that you want to send.
4. Click the "Send" button.
5. In the "Confirm transaction" screen that displays, review the amount, address and fees, and decide whether you want to execute the transaction or not.
   * Each owner of this Chiliz Safe wallet can decide to execute the transaction or not. You need to reach the chosen threshold in order for the transaction to go through.<br>

     <figure><img src="/files/rGQ81iLH5Ityyp777LW9" alt=""><figcaption></figcaption></figure>
6. Click the "Execute" button.
7. Confirm the transaction from your wallet.
8. Chiliz Safe displays a summary page, allowing you to see where your transaction stands. You can click "Finish" whenever you want.


# About Bridging

Overview of bridging CHZ and other tokens between Chiliz Chain, Ethereum, Base, and Solana using Chainport, Chiliz Bridge, and LayerZero/Stargate.

## What is a bridge?

A bridge is a dApp whose smart contract allows token holders to move their tokens or digital assets from one blockchain network to another.

In the case of Chiliz Chain, token holders can move their tokens (CHZ or others) between several networks (Ethereum, Base, Solana) and Chiliz Chain.

## Bridging CHZ tokens

There are several bridging dApps that allow you to bridge your tokens to Chiliz Chain.

{% hint style="info" %}
On Ethereum Mainnet, CHZ tokens are ERC-20 tokens,\
while on Chiliz Chain, CHZ is the native token (CAP-20).
{% endhint %}

### Using Dcentralab's Chainport

The Chainport bridge can bridge ERC-20 CHZ tokens from Ethereum to wCHZ tokens (wrapped CHZ) on Chiliz Chain. It also very versatile, in that it can also work with several other tokens.

{% content-ref url="/pages/tXw4jvQ4xizLBBSSuJtd" %}
[Using Chainport](/learn/about-bridging/using-chainport)
{% endcontent-ref %}

This means that once you have bridged an ERC-20 CHZ token from Ethereum to a wCHZ token (Wrapped CHZ) on Chiliz Chain, you need to unwrap that wCHZ to obtain a proper CHZ token (CAP-20).

To achieve that, follow this guide:

{% content-ref url="/pages/asZ8uyn2pYREdfp9o1AP" %}
[Use Wrapped CHZ](/develop/basics/use-wrapped-chz)
{% endcontent-ref %}

The resulting CHZ tokens are no different from regular CHZ tokens, it's just one more step to the bridging process.

### Using Chiliz's Ethereum Bridge

Our own Chiliz Bridge is meant to bridge ERC-20 CHZ tokens from Ethereum directly to a native CHZ token on Chiliz Chain.\
While is less versatile that Chainport (it does not support as many blockchain networks), it does the bridging job in a single step, without requiring the use of Wrapped CHZ (wCHZ).

{% content-ref url="/pages/Bn8Z4lJjc8mp0q2lpTZF" %}
[Using Chiliz Bridge](/learn/about-bridging/using-chiliz-bridge)
{% endcontent-ref %}

## Bridging any token

Thanks to LayerZero's omnichain protocol, it is possible to move any project token from any chain (EVM-based or not) to Chiliz Chain, and vice-versa.

{% content-ref url="/pages/gdEhIqv5Ao7HbqNGRWaG" %}
[Using Stargate](/learn/about-bridging/using-stargate)
{% endcontent-ref %}

{% content-ref url="/pages/Bn8Z4lJjc8mp0q2lpTZF" %}
[Using Chiliz Bridge](/learn/about-bridging/using-chiliz-bridge)
{% endcontent-ref %}

Learn more about how Chiliz Chain works with the omnichain protocol:

{% content-ref url="/pages/k9rb0O5hRvo8S4bfo3vN" %}
[Use Omnichain Tokens](/develop/advanced/use-omnichain-tokens)
{% endcontent-ref %}


# Using Chainport

Step-by-step guide to bridge ERC-20 CHZ tokens from Ethereum to wCHZ on Chiliz Chain (and back) using Dcentralab's Chainport bridge.

[Dcentralab](https://www.dcentralab.com/) created [Chainport](https://app.chainport.io/?from=ETHEREUM\&to=CHILIZ), a secure blockchain bridge that offers full interoperability with several blockchains, including Chiliz Chain.

<figure><img src="/files/PepFVYqrcNwF8P4rFrsr" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="warning" %}
The Chainport bridge converts ERC-20 CHZ tokens from Ethereum to wCHZ tokens (wrapped CHZ) on Chiliz Chain -- *not* native CHZ tokens.

This means that once you have bridged an ERC-20 CHZ tokens into a wCHZ token, you need to unwrap that wCHZ token into a CHZ token (in case you need a native CHZ token).

This is done [using Chiliz Bridge](https://bridge.chiliz.com/wrap), by selecting the WCHZ token and clicking "Unwrap".
{% endhint %}

ChainPort also supports the bridging of the Tether stablecoin (USDT) from Polygon to Chiliz Chain. More stablecoins will be added in time.

## **Prerequisites**

In order to bridge your CHZ tokens between Ethereum Mainnet and Chiliz Chain Mainnet, you need to have a wallet with either ETH, CHZ, or other tokens that you want to bridge.

You can use MetaMask of course, or any other browser-based wallet, or [any WalletConnect-compatible wallet](https://explorer.walletconnect.com/?type=wallet), as well as Fortmatic, Portis, and Trezro.

## Bridge CHZ from Ethereum to Chiliz Chain

{% hint style="warning" %}
You need:

* CHZ tokens on Ethereum Mainnet.
* Enough ETH to pay the bridging gas fee.
  {% endhint %}

1. Open the [https://app.chainport.io/](https://app.chainport.io/?from=ETHEREUM\&token=CHZ\&to=CHILIZ\&token=wCHZ) dApp.
2. Select Ethereum as the source blockchain, and select CHZ as the source token.
3. When selecting the destination token, Chainport will offer you to select wCHZ on Chiliz Chain. Click it.
4. Enter the amount of CHZ you want to bridge.\
   \&#xNAN;*NOTE: You should have enough ETH on Ethereum to cover the bridge fee.*
5. Click on "Approve CHZ".
6. Validate the bridging from your wallet.
7. You now have wCHZ tokens on Chiliz Chain!

{% hint style="info" %}
In case you need to unwrap the obtained wCHZ tokens, you can use the [Chiliz Wrapper](https://bridge.chiliz.com/wrap).
{% endhint %}

## Bridge CHZ from Chiliz Chain to Ethereum

{% hint style="warning" %}
You need:

* wCHZ tokens on Chiliz Chain Mainnet.
* enough CHZ to pay the bridging gas fee.
  {% endhint %}

{% hint style="info" %}
You need to wrap your native CHZ token on Chiliz Chain before you can bridge them to Ethereum. Use the [Chiliz Wrapper](https://bridge.chiliz.com/wrap) for this.

You only need to wrap the amount of CHZ that you want to bridge to Ethereum, *not* all your CHZ tokens.
{% endhint %}

1. Open the [https://app.chainport.io/](https://app.chainport.io/?from=CHILIZ\&token=wCHZ\&to=ETHEREUM\&token=CHZ) dApp.
2. Select Chiliz Chain as the source blockchain, then select wCHZ as the source token.
3. When selecting the destination token, Chainport will offer you to select CHZ on Ethereum. Click it.
4. Enter the amount of wCHZ you want to bridge.\
   \&#xNAN;*NOTE: You should have enough CHZ on Chiliz Chain to cover the bridging fee.*
5. Click on "Approve wCHZ".
6. Validate the bridging from your wallet.
7. You now have CHZ tokens on Ethereum!


# Using Chiliz Bridge

Use the Chiliz Omnichain Bridge (LayerZero) for Base and Solana transfers, or the Ethereum Bridge to move native CHZ between Ethereum Mainnet and Chiliz Chain.

Chiliz provides you with two bridging dApps, depending on your needs:

* The [Omnichain bridge](https://bridge.chilizchain.com/): allows you to bridge tokens between Chiliz Chain and several other blockchain networks, for instance Solana and Base.
* The [Ethereum bridge](https://bridge.chiliz.com/): allows you to bridge CHZ tokens between Chiliz Chain and Ethereum.

## Omnichain bridge

In April 2026, Chiliz Chain started supporting LayerZero's Omnichain protocol, with implementations on Solana and Base.

### **Prerequisites**

In order to bridge your tokens between Chiliz Chain Mainnet and any of the support blockchain network, you need to have:

* A Web3 wallet that works with all your chosen tokens.\
  We recommend [MetaMask](https://metamask.io/), which supports both EVM-based chains (Chiliz Chain and Solana) and Solana.
* A token that is supported by at least two of the above-mentioned networks.
* Enough native tokens in your wallet to to pay the gas fee:
  * On Chiliz Chain, you need CHZ tokens.
  * On Base, you need ETH tokens.
  * On Solana, you need SOL tokens.

{% hint style="warning" %}
When bridging a token from one wallet to another, the destination wallet must support the destination chain that you choose.
{% endhint %}

### Step by step instructions: Bridging from Chiliz Chain to Base

1. Open <https://bridge.chilizchain.com/><br>

   <figure><img src="/files/acTD3J7IxUD6XUnwnVHM" alt="" width="563"><figcaption></figcaption></figure>
2. Click on "Connect Wallet", and choose the wallet(s) that you already have.<br>

   <figure><img src="/files/beq9XgJoAzp2JJIYcGjK" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
You need to connect one wallet per environment.

* To bridge tokens between Base and Chiliz Chain, you can use a single Web3 wallet because both chains are EVM-based. MetaMask works with both networks.
* To bridge tokens between Solana and Chiliz Chain, you might need two Web3 wallets: one for Chiliz Chain (such as MetaMask), one for Solana (such as [Phantom](https://phantom.com/) or [Solflare](https://www.solflare.com/)).
  {% endhint %}

3. Now that your wallets are connected, you can start bridging your tokens.\
   Choose for instance to move 100 CHZ tokens from Chiliz Chain to Base:<br>

   <figure><img src="/files/nW8kN8vx1o2suRX20ZQl" alt="" width="375"><figcaption></figcaption></figure>

   Bridging will result in your chosen amount of tokens to move to from the origin chain to the chosen destination chain.\
   The Chiliz Bridge indicates at the bottom how much it will cost in gas fees, how long the bridging should take, and gives a reminder of the source and target networks (here: Chiliz Chain to Base).

{% hint style="info" %}
By default, the tokens are bridged to the same wallet address, but you can chose to bridge to another wallet by clicking the "Custom address" option.
{% endhint %}

{% hint style="warning" %}
Pay attention to the network logos! Do not bridge the wrong way.
{% endhint %}

4. Click the "Bridge" button to trigger the transaction from your wallet.\
   Validate the message window, then wait for the transaction to be done.
5. Chiliz Bridge will display a success message once the transaction is done.
6. Check your target Web3 wallet to make sure the bridged tokens have been deposited. Note that this can take a few minutes.

Congratulations! You have successfully bridged your tokens!

## Ethereum bridge

{% hint style="info" %}
**Token storage**

* **On Ethereum:**\
  The CHZ ERC20 tokens are locked in the `ERC20Handler` smart contract at this address: `0x2F1d2754393356AEA6334180DA04BAB84412D580` . You can see the amount of tokens locked on [etherscan](https://etherscan.io/address/0x2F1d2754393356AEA6334180DA04BAB84412D580) in the "Token Holdings" dropdown in the Overview block at the top.
* **On Chiliz Chain:**\
  The native CHZ are locked in the `NativeHandler` smart contract at this address: `0xC94c4Ec62a59fCF4964873cC6529559Cc7717388` . The balance of that address on the [explorer](https://scan.chiliz.com/address/0xC94c4Ec62a59fCF4964873cC6529559Cc7717388) is the amount of CHZ that is locked there.
  {% endhint %}

### **Prerequisites**

In order to bridge your CHZ tokens between Ethereum Mainnet and Chiliz Chain Mainnet, you need to have:

* A MetaMask wallet.
* CHZ tokens on at least one of the above-mentioned networks.
* Enough ETH to pay the gas fee if you are bridging from Ethereum to Chiliz Chain,\
  ...or...\
  enough CHZ to pay the gas fee if you are bridging back from Chiliz Chain to Ethereum.

### Step by step instructions

1. Open <https://bridge.chiliz.com>.

![](/files/ume2wodl82imCKq6DnVy)

2. Connect your MetaMask wallet to the network you want to bridge **from** (either Ethereum Mainnet or Chiliz Chain Mainnet).

<figure><img src="/files/PtwwSHFfuDMVy4jlcr8P" alt="" width="375"><figcaption></figcaption></figure>

3. Make sure the destination network is the network you want to bridge **to** (either Chiliz Chain Mainnet or Ethereum Mainnet).

<figure><img src="/files/kDrsGIM5Q5qeis9JGP0d" alt="" width="375"><figcaption></figcaption></figure>

4. Enter the amount of CHZ you want to bridge.\ <mark style="color:red;">You should have enough CHZ to bridge the selected amount and cover the bridge fee if you're bridging</mark> <mark style="color:red;">**FROM**</mark> <mark style="color:red;">Chiliz Chain.</mark>

<div align="center"><figure><img src="/files/Z0EOIQz6TPrl65XC6EdH" alt="" width="375"><figcaption></figcaption></figure></div>

5. Select your destination address (which is where you want your CHZ to arrive) and click "Start Transfer".

<div align="center"><figure><img src="/files/GONaUberXNcveuWVLTGo" alt="" width="375"><figcaption></figcaption></figure></div>

5. A summary appears, under the name "Pre-flight check".\
   Confirm by clicking "Start Transfer" one more time\_.\_

<div align="center"><figure><img src="/files/8TCO9J4yco8beggawA14" alt="" width="375"><figcaption></figcaption></figure></div>

6. Set a spending cap for your CHZ, and click "Next".

<div align="center"><figure><img src="/files/V1itjn1hhh1xSl7i5aat" alt="" width="178"><figcaption></figcaption></figure></div>

7. Review the details, and click "Confirm".

<div align="center"><figure><img src="/files/ljWsZoSJfQt7vudKpUjM" alt="" width="179"><figcaption></figcaption></figure></div>

8. You should now be able to see the "Initializing Transfer" window. Initialization should take a few minutes. Do not refresh the page nor close it!

<img src="/files/TWUCSSlQLZhHvRn0miTy" alt="" width="375">

9. The "In Transit" window appears. This means that your transfer has started.\
   This action can take up to 30 minutes. Do not refresh the page either!

<figure><img src="/files/e7T2bgWXHxufuVIOqU0W" alt="" width="375"><figcaption></figcaption></figure>

10. Finally, the "Transfer completed" window arrives.\
    Your transfer has been completed.\
    Your CHZ tokens will be locked on the network of origin (ie. Ethereum), and you'll receive an equivalent amount of CHZ tokens on the destination network (ie. Chiliz Chain).\
    \
    You can now view the transaction by clicking "View Transaction" or start a new transfer by clicking "Start New Transfer".

<figure><img src="/files/1RjiBMZsuhxupq2IF88G" alt="" width="375"><figcaption></figcaption></figure>

11. Check your wallet on Chiliz Chain to make sure the bridged CHZ tokens have been deposited. Note that this can take a few minutes.

Congratulations! You have successfully bridged your CHZ tokens!


# Using Stargate

Transfer tokens across 80+ chains to and from Chiliz Chain using Stargate's Simple and Advanced modes, powered by the LayerZero OFT standard.

[Stargate](https://stargate.finance/) is an asset bridge built on top of the [LayerZero protocol](https://layerzero.network/), enabling seamless asset transfers between 80+ blockchains, without wrapping tokens, all thanks to the [OFT standard](https://docs.layerzero.network/v2/concepts/applications/oft-standard).

{% hint style="info" %}
Stargate provide [their own tutorial for token transfers](https://docs.stargate.finance/user-docs/transfer).
{% endhint %}

Stargate has two modes, depending on how granular you want to go on some parameters.

## Simple Mode

The Simple Mode is pretty straightforward:

1. Click the "From" field and select one of the tokens found in the wallet that you connected to Stargate.
   * You can also explore the various chains and tokens supported by the bridge, using the search field.
2. Now that it knows the source chain and token, Stargate can suggest target chains and tokens that are compatible.

<figure><img src="/files/WQTZCYbSRJs2uRV4xYo6" alt="" width="375"><figcaption></figcaption></figure>

3. Select the target token and chain, then enter how much source token you want to bridge.

<figure><img src="/files/RInDJuUMObyPHifEK73H" alt="" width="375"><figcaption></figcaption></figure>

4. Click "Transfer" to trigger the confirmation dialog from your Web3 wallet.
5. Once confirmed, Stargate takes care of the bridging itself.

## Advanced Mode

While the Advanced Mode presents a wider interface, it is not much more complex than the simple, it simply offers a better overview of what's possible.

<figure><img src="/files/4UorpjIqdU4yKMfWjDh4" alt=""><figcaption></figcaption></figure>

The most notable customizations are:

* "Gas on destination": Use this option if you need native tokens on the destination chain, to facilitate other transactions, such as local swaps.
* "Fee tolerance": You can choose a maximum fee tolerance (in percentage of the transfered tokens). If the amount you're receiving on the target chain is outside of this tolerance, the transaction is reverted.

<figure><img src="/files/5cvG0FxlxCrNY5pteUyQ" alt="" width="375"><figcaption></figcaption></figure>

Otherwise, the way it works remains the same as in the Simple Mode.


# Bridging stablecoins

Bridge USDT (Tether) and USDC to Chiliz Chain via Chainport from Polygon or Ethereum, with contract addresses for Bridged USDT and Bridged USDC on Chiliz Chain.

Since October 2024, it is possible to bridge stablecoins to their wrapped equivalent on Chiliz Chain, using third-party bridges such as [Chainport](https://app.chainport.io/). You can also bridge from Chiliz Chain to supported chains.

The stablecoins that can be bridged to Chiliz Chain are:

* Tether ([USDT](https://tether.to/)):
  * The world's first stablecoin.
  * Can be bridged using [Chainport](https://app.chainport.io/), from/to Polygon or Ethereum.
  * On Chiliz Chain, it is bridged to a Bridged Tether.
  * [See the smart contract](https://chiliscan.com/token/0x37C57a89812a0D492AeEd7691F1610CA0a8f74A1/contract/code).
* US Dollar Coin ([USDC](https://www.circle.com/usdc)):
  * A stablecoin pegged to the US Dollar.
  * Can be bridged using [Chainport](https://app.chainport.io/), from/to Polygon, Ethereum, Base, or Meld.
  * On Chiliz Chain, it is bridged to a Bridged USDC.
  * [See the smart contract](https://chiliscan.com/token/0xa37936F56249965d407E39347528a1A91eB1cbef/contract/code).

Learn more here:

{% content-ref url="/pages/Uu9QoX1dgGkoU4ZiUMQN" %}
[About Stablecoins](/learn/about-stablecoins)
{% endcontent-ref %}

## Example: Bridging USDT (Tether) from Polygon to Chiliz Chain

<figure><img src="/files/c3GhV7KgIvhiY6a26bJM" alt="" width="375"><figcaption></figcaption></figure>

1. Open the [https://app.chainport.io/](https://app.chainport.io/?from=CHILIZ\&to=ETHEREUM) dApp.
2. Select Polygon as the source blockchain, and select USDT as the source token.
3. When selecting the destination token, Chainport will offer you to select USDT on Chiliz Chain. Click it.
4. Enter the amount of USDT you want to bridge.\
   \&#xNAN;*NOTE: You should have enough USDT tokens on Polygon to cover the bridge fee.*
5. Click on "Port USDT".
6. Validate the bridging from your wallet.
7. You now have USDT tokens on Chiliz Chain!


# Making your project token bridgeable

List your EVM project token on Chainport to make it bridgeable to Chiliz Chain, with Chainport listing requirements and liquidity pool provisioning steps.

For those of you with a sports-related project, you can list your project's token on Chainport in order to allow token holders to bridge their tokens to Chiliz Chain.

<figure><img src="/files/PdeTEhsdTVNUJ5l23k4o" alt="" width="200"><figcaption></figcaption></figure>

As the Sports Blockchain, Chiliz Chain is the place where your sports-related project can find exposure and thrive. By tapping into our targeted audience and being surrounded by sports giants, you project will be right at home!

{% hint style="info" %}
Your token can be from any EVM-compatible chain supported by Chainport.
{% endhint %}

## Requirements

Your token must first be listed on Chainport. Follow this guide:

{% embed url="<https://docs.chainport.io/teams/listing>" %}

*In short, you need to use* [*this form*](https://www.chainport.io/list-a-token)*.*

2. Then, you must provide enough liquidity in your Liquidity Pools:

{% embed url="<https://docs.chainport.io/for-users/how-to-provide-liquidity-to-chainports-liquidity-pools>" %}

There you go! Your token should now be available to bridge to Chiliz Chain, under the same name as it was on the source chain.

## Resources

The Chainport team has written a deep-dive into Chiliz Chain:

{% embed url="<https://www.chainport.io/knowledge-base/chiliz-chain-deepdive>" %}

Learn more about the method used to bridge from any chain to Chiliz Chain:

{% embed url="<https://www.chainport.io/bridging/wrapped-asset-bridging>" %}


# About Staking

Stake your CHZ on Chiliz Chain and earn more CHZ!

## Staking

Staking is an integral part of a Chiliz Chain's consensus mechanism. It involves holding CHZ in a wallet to support Chiliz's operations, to secure transactions, and to maintain the blockchain's integrity.

Participants earn rewards (additional CHZ), which serve as motivator for contributing to the network's stability.\
They also get opportunities based on the percentage of their stake in the total pool of stakes. Among the opportunities are validating transactions, creating more blocks, and becoming validators.

## Validators and delegators

There are two roles in the Chiliz Chain consensus mechanism: Validators and Delegators.

{% content-ref url="/pages/Wb9wAJtwJOttSCvK39G4" %}
[Defining Validators and Delegators](/learn/about-validators/defining-validators-and-delegators)
{% endcontent-ref %}

Validators are usually bigger players who want to contribute to Chiliz Chain and support the network, by providing node which in turn validate new blocks created on the chain. In exchange, they get voting power equivalent to their stake.

Delegators are more regular crypto-fans who choose to stake their CHZ as part of a validator's stake. They "delegate" their CHZ to them, and rely on their vote.\
Thanks to this system, it becomes easier to participate in Chiliz Chain's governance, and support Chiliz activities.

**You too can earn rewards in return for staking your CHZ!**\
By staking your CHZ to a validator, you become what is called a "delegator": You *delegate* your CHZ to a validator, who in turn can stake more CHZ and therefore earn more reward.

{% content-ref url="/pages/v0fezk71FFfetIcOhdNt" %}
[Stake your CHZ](/learn/about-staking/stake-your-chz)
{% endcontent-ref %}

{% hint style="info" %}
You can withdraw your stake whenever you want.\
However, there's a timeframe of 2 full epochs (approximately 3 days) before you can claim your reward.
{% endhint %}

{% content-ref url="/pages/eSRJkSJDtouV2AkxaJwW" %}
[Unstake your CHZ](/learn/about-staking/unstake-your-chz)
{% endcontent-ref %}

## Chiliz governance

Chiliz Chain relies on a Proof of Staked Authority (PoSA) governance, and a robust structure of validators that help in reducing gas fees and shorten block creation time.

In a PoSA consensus-governed blockchain, the validators of the network are able to vote on proposed changes to the network (called "proposals"). Only active validators can vote and there has to be a ⅔ consensus for the proposal to pass.

Proposals are open for 7 days. If a consensus is not reached by that time, the proposal does not pass. The more CHZ staked and/or delegated by a specific validator, the more voting power the validator has, making their vote worth more influential.

On the Chiliz Governance site, you can see the [history of proposals](https://governance.chilizchain.com/governance) including any active/open proposals that validators are still voting on or are waiting to be executed.

## Chiliz staking: reward breakdown

When you stake CHZ on the chain, you earn rewards based on the amount being inflated per blocks, as well as based on the priority fee being paid by users in their transactions. When a validator creates a block, they get these rewards and distributes them accordingly.

Here's how the rewards are divided:

* Validators get 65% of the rewards. This is then split with the delegators of the specific validator.
* The other 35% of the rewards get invested to help maintain and grow the Chiliz Chain network.

More information here:

{% content-ref url="/pages/vFrZxJWZWgy5WjgqbmZS" %}
[Staking Rewards](/learn/about-staking/staking-rewards)
{% endcontent-ref %}


# Stake your CHZ

Stake your CHZ on Chiliz Chain and earn rewards!

As a crypto-fan, you can stake your CHZ as part of a validator's stake, thus becoming a "delegator".\
You earn rewards in return for staking your CHZ.

{% hint style="info" %}
The prerequisite is to stake a MINIMUM of 0.01 CHZ.
{% endhint %}

To become a delegator, you need to stake some CHZ to a [validator of your choice](https://app.chilizchain.com/staking).\
How long you stake your CHZ is also your decision to make.

## Prerequisite

In order to stake CHZ, you need a Web3 wallet (such as MetaMask) and CHZ tokens on that wallet.

{% content-ref url="/pages/7jmbvsuzJaARscErNwWb" %}
[How to use MetaMask](/learn/about-wallets/how-to-use-metamask)
{% endcontent-ref %}

## Connect to Chiliz Staking dApp

The first step to stake your CHZ is to connect with your preferred Web3 wallet).

1. Visit the [Chiliz Staking dApp](https://app.chilizchain.com/staking).

<figure><img src="/files/5zbDaPY7IKdKAutX23DI" alt="" width="563"><figcaption></figcaption></figure>

2. Click "Connect Wallet", and select your Web3 wallet of choice (for instance, MetaMask).

<figure><img src="/files/tCXQv1GHZbvvRYwR7q1F" alt="" width="563"><figcaption></figcaption></figure>

3. This will trigger an authentication request from your wallet. Select the account you want to connect with your staking account, and validate.
4. Once your wallet is connected, you will see your Chiliz Staking dashboard.

<figure><img src="/files/GNmCuIaW32sWOlXRC4YP" alt="" width="563"><figcaption></figcaption></figure>

You are now ready to stake to a validator.

## Staking your CHZ to a validator

1. From the dashboard, scroll down a bit to see the list of validators.\
   \&#xNAN;*Validators are sorted by current APY, which is updated live.*

<figure><img src="/files/wKdukxwEFwhHeRaMBV2w" alt="" width="563"><figcaption></figcaption></figure>

2. Choose a validator whose pool you want to stake with.\
   The information below can help you choose wisely who to stake your CHZ to.

{% hint style="info" %}
**How to choose a validator**

Chiliz will never tell you who to stake your CHZ to. It is up to you to make that decision.

We advise you to:

* Find out more about each validator's reputation.
* Pay attention to the commission rate for each validator (see below).
* Pay attention to the Annual Percentage Yield (APY) of each validator (see below).
* Pay attention to the voting power for each validator (see below).
  {% endhint %}

{% hint style="info" %}
**About commission rate**

The validator commission rate is a fee taken from the cut of all delegator rewards. This is a fee that the validator keeps since they provide the service (i.e. running the validator node) so that the delegators don't have to.

For instance, if the pool of delegators earns 20 CHZ and the commission rate is 10%, then 2 CHZ stay with the validator and the rest is distributed among the delegators.

Therefore, the lower the commission rate, the more your will earn from the total reward pool for delegators.

*Suggestions:*

* *Pick a validator with a sustainable commission rate (e.g., 5-10%).*
* *Avoid validators whose rate is at 0% (unsustainable long-term) or above 20% (greedy).*
  {% endhint %}

{% hint style="info" %}
**About APY**

The Annual Percentage Yield (APY) is the annual rate of interest paid to stakers based on their stake.

The calculation displayed on the dashboard is an estimation based on the average income of each validator over the past 24 hours, taking into account the validator’s commission rate.

Therefore, choosing a validator with the highest APY number without context can lead to unreliable returns.

*Suggestions:*

* *Pick a validator with an average APY, or slightly higher than average.*
* *Don't rush for validators with an APY that is significantly higher than everyone else, as it is likely to be temporary.*
  {% endhint %}

{% hint style="info" %}
**About voting power**

Voting power indicate a validator's influence and stability within Chiliz Chain, contributing to overall security and efficiency of the network.

Note that more voting power does not necessarily mean more staking rewards for delegators.\
High voting power in a validator may suggest stability and therefore consistent rewards; but it doesn't directly mean higher rewards for individual stakers.

*Suggestions:*

* *Pick a validator with mid-range voting power.*
* *Avoid validators with very low voting power (risk of dropping out of the active set).*
  {% endhint %}

3. Once your choice is made, click "Stake" for that validator.
4. Fill in the form, choosing the amount of CHZ you want to stake (the minimum is 0.01 CHZ), and click "Submit".

<figure><img src="/files/BrhQniGiozWe9AyKHRoW" alt="" width="375"><figcaption></figcaption></figure>

3. Your Web3 wallet will open, asking you to confirm the transaction details. Read everything carefully, then select "Confirm".
4. The Chiliz Staking dApp will then display a notification confirming the staking.

Congrats for supporting the Chiliz Chain network!

## Staking your CHZ on Spicy Testnet

By default, the Chiliz Staking dApp is set to stake on Chiliz Chain Mainnet.

You might want to stake on Spicy Testnet, if you just want to learn/test and not earn any real reward.\
But in most cases, it's no use to stake on a testnet network.

To switch the Chiliz Staking dApp from Mainnet to Testnet, click this icon:

<figure><img src="/files/Kje2TaPvY9PDjWBEZNvm" alt=""><figcaption></figcaption></figure>

It opens the network switching modal:

<figure><img src="/files/pDjNfDEdW7bGyLaKAofu" alt="" width="375"><figcaption></figcaption></figure>

Click "Chiliz Chain Spicy" to stake on Spicy Testnet.

The procedure is then the same, except for these network details:

* Epoch: 7,200 blocks, roughly equivalent to 6 hours.
* Wait time until you can claim your reward: 1 full epoch, so at most 12 hours.

## Staking your CHZ from your Ledger

You can stake from your hardware wallet, such as a Ledger one. Here is how:

1. Make sure your [Ledger wallet is all set up in MetaMask](/develop/basics/connect-to-chiliz-chain/use-a-hardware-wallet).
2. Connect to the [Chiliz Staking dApp](https://app.chilizchain.com/staking), find the validator you want to stake to, and click on the "Stake" button on their line.
3. Enter the amount of CHZ you want to delegate and hit the "Submit" button.
4. A MetaMask window will pop up. Make sure you read the text in the blue box (it should say "Prior to clicking confirm..."), then click "Confirm". Just make sure your Ledger hardware wallet is unlocked before you do this.

{% hint style="warning" %}
Even though the transfer has been confirmed on MetaMask, you're not quite done yet: you need to also confirm it on your Ledger. Do this by validating the action with the Ledger's physical buttons. Once you've done this, your transaction will be complete.
{% endhint %}

Done! You've successfully staked CHZ from your Ledger wallet.


# Unstake your CHZ

Step-by-step guide to unstaking and claiming CHZ on Chiliz Mainnet and Spicy Testnet via the Chiliz Staking dApp, with epoch-based cooldown period explained.

After staking CHZ to a Chiliz Chain validator, there might come a time when you want to take some (or all) of your CHZ back to your Web3 wallet: this means you would "unstake & claim" them.

The good news is that you can start this process at any moment, with any amount of CHZ.

*Note: Unstaking is also called "undelegating".*

{% hint style="info" %}
There is a wait-time between unstaking your CHZ and claiming them back.

**Chiliz Mainnet:**

* 1 epoch is equivalent to 28,800 blocks, or approximately 1 day.
* Once you have unstaked CHZ, you need to wait the end of the current epoch + 2 fully completed epochs (or 86,400 blocks) to claim them, or at most 3 days.

**Spicy Testnet:**

* 1 epoch is equivalent to 7,200 blocks, or approximately 6 hours.
* Once you unstake CHZ, you need to wait the end of the current 1 epoch + 1 fully completed epoch to claim them, or at most 12 hours.
  {% endhint %}

## Steps to unstake & claim your CHZ from Chiliz Mainnet

Follow these steps:

1. Connect your MetaMask wallet to the [Chiliz Staking dApp](https://app.chilizchain.com/staking).
2. Click the "My Staking" button to access your current stakes.
3. Scroll down to the validator from which you want to get CHZ back, and click its "Unstake" button.

<figure><img src="/files/FSroFfpxmCPG1zylS5AK" alt="" width="375"><figcaption></figcaption></figure>

4. Enter the amount of CHZ you want to unstake.\
   \&#xNAN;*You can choose part of your stake, or all of it (click MAX).*

<figure><img src="/files/DMz10OoNmJ20dDdlMF3N" alt="" width="375"><figcaption></figcaption></figure>

5. Click "Unstake\_"\_. Your Web3 wallet should open a window, asking you to validate the transaction. Confirm it.

{% hint style="warning" %}
At this step, you can't withdraw the unstaked CHZ yet. You have to wait for 2 full epochs to pass (plus the remainder of the current epoch), which is roughly 3 days on Chiliz Mainnet.
{% endhint %}

Once this lapse of time has passed, you can return to your My Staking dashboard in order to claim your CHZ. Find the "Claim\_"\_ button on the validator you requested to unstake from, and click it.

<figure><img src="/files/kfa6Kv2Rm8Irdkgi6bKN" alt="" width="375"><figcaption></figcaption></figure>

Confirm the transaction through your Web3 wallet.

And you're done! Your CHZ should soon appear in your Web3 wallet.

{% hint style="info" %}
**About the cooling period**\
\&#xNAN;*Why does it take that long to claim unstaked CHZ?*\
\
When you unstake/undelegate CHZ, there is an "undelegate period", or "cooling period", during which your CHZ are not yet available to you. This is a standard for all blockchain staking mechanisms.

On Chiliz Mainnet, this cooling period lasts 2 fully completed epochs (or 86,400 blocks, or to put it simply, at most 3 days).

That is why, after unstaking CHZ, your indicated amount of unstaked CHZ will appear in the "Pending" column of your My Staking page, until 2 full epochs have passed.\
After those 2 full epochs have passed, your CHZ will be in the "Claimable" column, meaning that you can claim them using the "Claim" button that now appears in the interface.
{% endhint %}

{% hint style="info" %}
**About the way epochs work**\
\&#xNAN;*Why wait 3 days when it says 2 epochs, and 1 epoch ≈ 1 day?*

The cooling period technically takes 2 full epochs to complete, but to account for the end of the current epoch, it's safer to wait for the start of the 3rd epoch (at 86,400 blocks, or roughly 3 days).

Hence, when estimating the time when you can claim your unstaked CHZ, you should factor in the current epoch's end and 2 subsequent epochs.
{% endhint %}

{% hint style="info" %}
When you unstake your CHZ, you cannot unstake again right away.\
You need to wait for the end of the cooling period in order to do so.

So be sure to enter the correct amount to unstake before confirming the transaction.
{% endhint %}

## How do I claim my rewards?

{% hint style="info" %}
**A reminder on compound reward**

Your rewards are compounded to your staked CHZ.\
This way, even your rewards can bring you even more rewards!

The rewards *cannot* be claimed separately from the stake; you have to unstake your CHZ then claim them all: initial stake and the compounded rewards.
{% endhint %}

You can claim your CHZ rewards when roughly 3 days (86,400 blocks) have passed since you unstaked them.

Hence, in order to claim your rewards, you must first unstake a given amount (see above), wait 3 days, then follow the relevant steps below.

### Claim rewards as a Delegator

Once you have unstaked your CHZ and waited the necessary 3 days (see above), you can do the following:

1. Connect your MetaMask wallet to the [Chiliz Staking dApp](https://app.chilizchain.com/my-staking).
2. Find the "Claim\_"\_ button on the validator you are currently staking to and click on it.
3. This will open your MetaMask wallet: confirm the transaction, and you're done!

As for your reward, since the system auto-compounds itself, your reward is ultimately part of your stake, and thus of your unstaked/claimed CHZ.

### Claim rewards as a Validator

{% hint style="info" %}
As a Chiliz Chain Validator, you receive two types of rewards:

* your validator commission fee,
* rewards accumulated based on your original stake.

Those two rewards are nonetheless compounded, and cannot be separated when undelegating and claiming CHZ.

*Note: The validator commission can only be claimed by the validator node address.*
{% endhint %}

Once you have unstaked your CHZ and waiting the necessary 3 days, you can do the following:

1. Connect your MetaMask wallet to the [Chiliz Staking dApp](https://app.chilizchain.com/my-staking).
2. Find the "Claim Validator Rewards\_"\_ button in your validator row, and click on it.<br>
3. This will open your Web3 wallet: confirm the transaction, and you're done!

## Steps to unstake your CHZ from Spicy Testnet

If you staked on Spicy Testnet for testing purposes, you can test unstaking too of course.

To switch the Chiliz Staking dApp from Mainnet to Testnet, click this icon:

<figure><img src="/files/Kje2TaPvY9PDjWBEZNvm" alt=""><figcaption></figcaption></figure>

It opens the network switching modal:

<figure><img src="/files/pDjNfDEdW7bGyLaKAofu" alt="" width="375"><figcaption></figcaption></figure>

Click "Chiliz Chain Spicy" to stake on Spicy Testnet.

The procedure is then the same, except for these network details:

* Epoch: 7,200 blocks, roughly equivalent to 6 hours.
* Wait time until you can claim your reward: 1 full epoch, so at most 12 hours.


# Staking Rewards

How CHZ staking rewards are distributed: 65% to validators/delegators, 25% to E\&O, 10% to Community Vault, plus Snake8 probabilistic block selection based on staked CHZ.

## What are staking rewards?

Staking rewards refer to the rewards received by wallets which are locking or staking their CHZ in the staking pool contract. Locking or staking CHZ is an essential component of the governance of the chain.

Staking rewards come from the CHZ inflated each block, as well as from tips paid by users to get their transactions prioritised. So if a block includes 50CHZ worth inflation and 50CHZ worth of priority fees, those CHZ are used to reward stakers (Validators and Delegators) for participating in the governance of the chain.

{% hint style="info" %}
Your rewards are compounded to your staked CHZ.

This way, even your rewards can bring you even more rewards.
{% endhint %}

## How are the fees in each block distributed as rewards?

The distribution of the fees collected in each block are distributed as follows:

* 35% of the total fees in a block are taken by the network, to be reinvested into the chain. These 35% are split as follows:
  * **Community Vault, $CHZ LP & Possible Shared Security Restaking Rewards: 10%**

    This allocation is designed to support community engagement and ecosystem liquidity. It funds incentives for participating in liquidity pools on Chiliz Chain-native DEXs and other community-driven initiatives, fostering a vibrant ecosystem around the Chiliz Chain. This is vital for encouraging the development of a robust DeFi landscape within the Chiliz Chain, crucial for its long-term competitiveness and appeal.
  * **Ecosystem and Operational (E\&O) Distribution: 25%**\
    The E\&O distribution is allocated for ongoing development, marketing, and operational expenses associated with the Chiliz Chain. This ensures sustainable growth of the platform and its ecosystem, covering necessary expenses for innovation, ecosystem support, outreach and continuous growth of the ecosystem partnerships, which are essential for maintaining relevance and driving adoption.
* 65% of the total fees in a block are kept by the validator, and subsequently distributed to the delegators staking on that particular validator node.

{% hint style="info" %}
**Example scenario**

Let's say that a block has 100 CHZ rewards, and the validator has 10,000,000 CHZ self-staked and 10,000,000 CHZ delegated from many delegators. The validator has set the commission rate to 10%. The rewards will be distributed as follows:

* 35% will remain with the network (35% \* 100 CHZ = 35 CHZ)
* 65% will go to the validator (65% \* 100 CHZ = 65 CHZ). Those 65 CHZ will then be split 50% to validator and 50% to delegators since both are staking the same amount. We then need to reduce the commission rate from the delegators cut. This means:

  * Delegators' cut will be: 50% \* 65 CHZ = 32.5 CHZ - 10% = 29.25 CHZ
  * Validator's cut will be: 50% \* 65 CHZ = 32.5 CHZ + 10% = 35.75 CHZ

  The Delegators' cut is then distributed fairly among all the delegators of the specific validator, based on how much they currently have staked.
  {% endhint %}

Since the [Snake8 hard fork in October 2025](/chiliz-chain-changelog/governance-proposals-and-decisions/october-2025-snake8-hard-fork), block creation is no longer sequential; instead, each Validator has a probability of being chosen to create the next block.\
This probability is weighted by the amount of CHZ staked on that validator: The more CHZ staked, the higher the chance they will be selected to create the block and keep its associated fees.

Validators keep the fees of the 1 block they have validated.

## Validator Commission Fee

The validator commission fee is a fee taken from the cut of all delegator rewards. This is a fee that the validator keeps since they provide the service (i.e. running the validator node) so the delegators don't have to.

Therefore, if delegators keep 20 CHZ and the commission rate is 10%, then 2 CHZ stay with the validator and the rest is distributed among the delegators.


# Chiliz Staking FAQ

Answers to common CHZ staking questions: epoch duration (28,800 blocks ≈ 1 day), reward compounding, 86,400-block cooldown period, Ledger support, and commission rates.

## How often do staking rewards pay out?

Rewards compound (or "add up") to your CHZ stake every time an epoch passes, an epoch being 28,800 blocks on Chiliz Chain Mainnet (or roughly 24 hours). Technically, rewards pay out as every block passes, and it's updated on the Staking dApp once every epoch (≈ once every day).

On the [Chiliz Staking dApp](https://app.chilizchain.com/staking), your staked CHZ include both the total amount of CHZ that you have staked, and any staking rewards earned since then. Your staked balance is updated daily.

Note that the amount listed on the Staking dApp is not updated live, but once per epoch.

## Do the rewards start to accrue immediately?

Yes, rewards accrue daily after staking, until you undelegate/unstake.

## How can I claim my rewards?

To claim your CHZ, you must first unstake them (which takes up to 3 days / 2 full epochs / 86,400 blocks), then claim them.

On the [Chiliz Staking dApp](https://app.chilizchain.com/staking), “Pending CHZ” refers to tokens that are in the process of being unstaked, which takes up to 3 days (at least 86,400 blocks). After this period, your CHZ will be available for claiming.

## How long do I need to wait to claim my rewards?

You need to wait 86,400 blocks (up to 3 days) between the moment you request an amount of staked CHZ to be unstaked, and the moment you can claim them. This is called the “cooling period”, or "cooldown period".

## Are my rewards compounded with my stake?

Yes, your rewards are added to your stake. This way, even your rewards can bring you even more rewards.

## Where can I see my rewards?

Your rewards are compounded to your staked CHZ.

## Can I stake from Ledger?

Yes, you can stake CHZ from your Ledger. [See here](/learn/about-staking/stake-your-chz#staking-your-chz-from-your-ledger).

## Is the commission rate percentage subtracted from the APY visible on the Chiliz Staking dApp?

Yes, the validator's commission fee is deducted from the calculated APY percentages shown on the dApp.

## How many CHZ is it advisable to keep in the wallet to have the necessary amount for unstaking?

Just a few, 5-10 CHZ should cover the gas for the claim transaction.

## How should I pick the validator I stake my CHZ to?

We will never tell you who to pledge your CHZ to. It is up to you to make that decision.

[You can find some handy advice here](/learn/about-staking/stake-your-chz#staking-your-chz-to-a-validator).

## What are the risks if the validators make some mistakes?

The only risks are the validator being offline for more than 12 hours. Because of this, the epoch rewards would be removed as a penalty, and the validator might choose to remove their CHZ, which would result in the validator no longer generating rewards.

In any case, you can request the unstake your CHZ without problems.


# About Validators

Introduction to Chiliz Chain's PoSA consensus, Main Validators, Candidate Validators, slashing mechanisms, and delegator roles in block production.

Chiliz Chain relies on the Proof of Staked Authority (PoSA) consensus mechanism, designed to ensure fast block times and cost-efficient transactions.

Advanced security features, including double-sign detection and slashing mechanisms, maintain the integrity, stability, and finality of the chain.

This consensus mechanism is primarily managed by two key roles:

* the Validators, who are a critical part of the chain. They create and validate blocks in turns.
* the Delegators, who allocate their CHZ to the validators' pools in order to participate in the governance of the chain and earn reward.

In Chiliz Chain, there is a set maximum of block-creating validators. There can also be an unlimited amount of active validators which are not creating blocks, but are in the queue in case a block-creating validator goes offline or gets "jailed".


# Defining Validators and Delegators

Definitions and roles of Chiliz Chain validators and delegators under PoSA: block production, CHZ staking, epoch elections, and reward distribution mechanics.

The Proof of Staked Authority (PoSA) consensus mechanism implements two key roles to ensure the network's integrity and performance: Validators and Delegators. These roles are integral to block creation, transaction validation, and network governance.

## Validators

Validators are the backbone of Chiliz Chain. They are nodes responsible for producing blocks, securing the network, and maintaining the blockchain's integrity.

Validators contribute to Chiliz Chain by:

* Producing Blocks: Validators package transactions, create, and validate blocks in a secure and efficient manner.
* Securing the Network: By participating in the PoSA consensus, validators ensure the network remains decentralized and resistant to attacks.
* Earning Rewards: Active Validators receive CHZ rewards for their efforts, funded through transaction fees and staking rewards.

There are two types of validators:

* Main Validators: A set number of block-producing validators are responsible for validating transactions and committing new blocks to the chain.
* Candidate Validators: Validators that remain on standby (they don't produce blocks). These validators can step in if a Main Validator becomes unavailable or is penalized.

A periodic election process, conducted every epoch (28,800 blocks), ensures that the highest-staked validators, referred to as Main Validators, are available to produce blocks. If a Main Validator is not available (offline or "in jail"), Candidate Validators (those outside the active set) must await the next election cycle to possibly join the block production process, unless the Main Validator has rejoined already.

## Delegators

Delegators play a vital role in Chiliz Chain governance by staking their CHZ to support validators. By delegating their tokens, they indirectly participate in network security and governance while earning rewards.

Delegators contribute to Chiliz Chain by:

* Staking: Delegators allocate their CHZ to a validator’s staking pool, enhancing the validator’s chances of being selected for block production.
* Participation in chain governance: By staking CHZ, delegators weigh in on decision-making processes on Chiliz Chain.
* Earning Rewards: In return for their support, delegators earn a share of the rewards generated by the validator.


# Why Become a Validator

Benefits of becoming a Chiliz Chain validator: CHZ rewards from transaction fees and staking, governance influence, ecosystem reputation, and PoSA economics overview.

Becoming a Chiliz Chain validator offers a unique opportunity to actively participate in the blockchain ecosystem while enjoying strategic and financial benefits.

## Benefits

The benefits are many:

* Earn CHZ Rewards: Gain rewards through transaction fees and staking rewards.
* Enhance Reputation: Position your company as a leader and trusted partner in the Chiliz ecosystem.
* Influence Governance: Participate in key decisions shaping the network’s development and policies.
* Support Ecosystem Growth: Contribute to the security, decentralization, and reliability of Chiliz Chain.

Joining as a validator positions your company at the forefront of blockchain innovation and decentralized technology.

## Economics

To better understand the economics of being a Validator, you need to know about Staking Rewards on Chiliz Chain.

{% content-ref url="/pages/vFrZxJWZWgy5WjgqbmZS" %}
[Staking Rewards](/learn/about-staking/staking-rewards)
{% endcontent-ref %}

{% content-ref url="/pages/HGgFZnBnwt6sSTQ6TZz7" %}
[Chiliz Staking FAQ](/learn/about-staking/chiliz-staking-faq)
{% endcontent-ref %}

\
Furthermore, we explain the tokenomics of Chiliz Chain itself in deep details in this page:

{% content-ref url="/pages/LqkVo2xmi02KJyykaFpT" %}
[Tokenomics](/learn/about-chiliz-chain/tokenomics)
{% endcontent-ref %}


# How to Become a Validator

Requirements and registration steps to become a Chiliz Chain validator: 10M CHZ minimum stake, validator set approval, and Governance dApp registration form.

By becoming a validator, you contribute to the security and decentralization of Chiliz Chain while earning rewards and playing a crucial role in the ecosystem's governance and growth.

## Prerequisites

Before registering as a validator, ensure you meet the following criteria:

* You must [run your own validator node](/learn/about-validators/running-a-validator-node), or use a third-party service to run the node for you.
* You must stake a MINIMUM of 10 million CHZ.
* You must get approved by the existing set of validators.

## Steps to Register as a Validator

Once the prerequisites are met, follow these steps to register on the Chiliz Governance dApp:

1. Open the [Chiliz Governance dApp](https://governance.chilizchain.com/staking).
2. Click on the "Register New Validator" button.\
   ![](/files/pKc0OU7b30RQ3sE97gKu)
3. Complete the Registration Form:\
   ![](/files/tiDBz1ljirgvQpm0QzcK)
   1. Enter the Blockchain Address of your validator node.
   2. Specify the amount of CHZ you want to stake (minimum 10 million CHZ).
   3. Set your preferred commission rate, which determines the share of rewards retained from your delegators.
4. Review the details carefully and click "Submit" to complete the registration process.

After you submitted the form, one of the existing validators will launch a [Governance Proposal](/chiliz-chain-changelog/governance-proposals-and-decisions), in order for the rest of the validators to vote on whether or not to include your validator node in the consensus mechanism.


# Running a Validator node

Setting up a Chiliz Chain Validator node

## **What is a validator node?**

To become a Chiliz Chain [validator](https://docs.chiliz.com/chiliz-chain-2.0/validator), you are required to run a Validator node, either with your own hardware, or through a partner.\
A node is a web server set up specifically to validate transactions before committing them on Chiliz Chain.

{% hint style="info" %}
Note that we have a more generic node-running documentation page: [Run a Chiliz Chain Node](/develop/basics/connect-to-chiliz-chain/run-a-chiliz-chain-node)
{% endhint %}

## TL;DR

To run a Validator node, you need to set the following parameters:

```bash
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 30303:30303 \
chilizchain/ccv2-geth:latest \
--mine \
--chiliz \ # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
--datadir=/datadir \
--password=/datadir/password.txt \
--allow-insecure-unlock \
--unlock=REPLACE_WITH_VALIDATOR_ADDRESS \
--syncmode=full \
--gcmode=archive \
--miner.etherbase=REPLACE_WITH_VALIDATOR_ADDRESS
--nodekeyhex=2668f377e69de_EXAMPLE_REPLACE_WITH_YOUR_VALUE_c88bea3e337446ed73 \
--nat=extip:140.250.140.250 \ # This is just an example.
--verbosity=4
```

{% hint style="warning" %}
Don't use this as-is!

Make sure to update the `unlock`, `miner.etherbase` and `nodekeyhex` parameter!
{% endhint %}

## Prerequisites

To run the Chiliz Chain validator node, you must have the Docker Engine installed either on your machine or server.\
You can use a cloud provider like Amazon Web Services, Google Cloud Platform, or Microsoft Azure, or you can set up your own server (see below).

Please complete the[ Docker installation](https://docs.docker.com/engine/install/) before you proceed.

### System requirements

You will need a dedicated server to run your validator node:

* CPU: At least 2 CPU cores.
* Memory: At least 4 GB of RAM.
* Disk: Use a solid-state drive (SSD) for optimal performance.
  * We recommend to have at least 300 GB of free disk space to sync with the chain.
* Network Bandwidth: At least 10 Gbps.

## Pre-built Docker images

View or use the pre-built Docker images from the [Chiliz Chain 2.0 public repository](https://hub.docker.com/repository/docker/chilizchain/ccv2-geth) on the Docker Hub. Note that you must have a Docker Hub account to access the repository.

## Launching a Validator node and starting the sync

The recommended starting point to run a Chiliz Chain validator node is with the mounted data volume. If this method is used to recreate a Docker container, the data gets stored in the directory and can easily be reused or cloned to another validator.

{% hint style="info" %}
As a fork of Ethereum, Chiliz Chain relies on [Geth](https://geth.ethereum.org/) for its node servers.

Go-ethereum (aka Geth) is an Ethereum client built in Go. Running Geth alongside a consensus client turns a computer into an node. It is therefore an essential part of your node.

We forked Geth into `ccv2-geth`, as you'll see below.
{% endhint %}

### Create the validator address

Create the validator node with the following command:

```sh
docker run --rm -ti \
-v $(pwd)/keystore:/root/.ethereum/keystore/ \
chilizchain/ccv2-geth:latest \
--chiliz \  # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
account new
```

You will need to type a password for the secret key file.

* **Public address of the key:** While running the validator, this address will be used to set the `--unlock` parameter.

```sh
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 30303:30303 \
chilizchain/ccv2-geth:latest \
--chiliz \ # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
...
--unlock=REPLACE_WITH_VALIDATOR_ADDRESS # This is just an example.
```

* **Path of the secret key file:** This file needs to be moved into the "keystore" directory inside the datadir `$(pwd)/my-datadir` you created in previous steps, so the final path of the file will be\
  `"$(pwd)/my-datadir/keystore/UTC–(TIMESTAMP)-(ADDRESS)"`.\
  **DO NOT** change the name of the file.
* **Password:** The password you typed during the the execution of the previous command needs to be stored in a file:\
  `$(pwd)/my-datadir/password.txt`\
  This file will be used to set the `--password` while running the validator node.\
  Do not forget that all files in the host path `$(pwd)/my-datadir` will be located in the container in `/datadir` directory, this is why the password parameter should be set as the following example:

```sh
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 30303:30303 \
chilizchain/ccv2-geth:latest \
--chiliz \ # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
...
--password=/datadir/password.txt
...

```

It is very important to have the following recommendations in mind:

* You can share your **public** address with anyone. Others need it to interact with you.
* You must **NEVER SHARE** the secret key with anyone! The key controls access to your funds!
* You must **BACK UP** your key file! Without the key, it's impossible to access account funds!
* You must **REMEMBER** your password! Without the password, it's impossible to decrypt the key!

### Generate the validator node key

*This section is optional.*

We recommend that generate a random hexadecimal string for the node.\
This is helpful for traceability on the logs and to avoid peering issues with the chain.

To accomplish this, you can use <https://www.browserling.com/tools/random-hex> and generate one hexadecimal key with 64 characters per node.\
While running a validator node, you can set `--nodekeyhex` with this value. This will ensure that when you restart the node, it will have the same node address (called "enode address") and it will allow for easier future debugging or fault finding.

```bash
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 30303:30303 \
chilizchain/ccv2-geth:latest \
--chiliz \ # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
...
--nodekeyhex=2668f377e69de_EXAMPLE_REPLACE_WITH_YOUR_VALUE_c88bea3e337446ed73 # This is just an example.
...
```

### Set Geth's NAT port mapping mechanism

Geth's `--nat` parameter has the following options: `any`, `none`, `upnp`, `pmp`, `pmp:<IP>`, and `extip:<IP>`. The default is `any`. [See the Geth doc for more info](https://geth.ethereum.org/docs/fundamentals/command-line-options).

We recommend that use the `extip:<IP>` option, where `<IP>` is the public IPv4 address where the validator is being launched.

```sh
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 30303:30303 \
chilizchain/ccv2-geth:latest \
--chiliz \ # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
...
--nat=extip:140.250.140.250 # This is just an example.
...
```

### Set verbosity

For deeper troubleshooting, Geth's logging verbosity parameter `--verbosity` can be set as:

* 0=silent
* 1=error
* 2=warn
* 3=info
* 4=debug
* 5=detail

The default value for is 3.\
We recommend that you use 4.

```sh
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 30303:30303 \
chilizchain/ccv2-geth:latest \
--chiliz \ # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
...
--verbosity=4 # This is just an example.
...
```

## Changing the owner of a node

There might come a time when you don't want to run a validator node anymore. You might then want to pass the node along to someone else.

In that case, you can follow these steps:

1. Connect your wallet to the [Chiliz Staking dApp](https://governance.chilizchain.com/staking).
2. Click the "Change owner" button.

<figure><img src="/files/rSrBMS8m6PfF7uWHLcnW" alt=""><figcaption></figcaption></figure>

3. In the modal window, indicate the current address of the node you want to change the owner of, and its new address (provided by the new owner).

<figure><img src="/files/r36lcUYb4mFupa7pbXp0" alt="" width="358"><figcaption></figcaption></figure>

Once submitted, the change will apply directly.


# How to Stop Being a Validator

Steps to decommission a Chiliz Chain validator node: clean shutdown, CHZ unstaking with 3-day cooldown, delegator notification, and Governance dApp deactivation.

You can stopping acting as a Chiliz Chain validator anytime you want. The process is straightforward when done responsibly, and it ensures that the network remains secure and stable.

Here's how you can stop being a validator:

1. Shut down your node:
   1. If you’re running your own validator node, ensure a clean shutdown to avoid unnecessary errors or penalties.
   2. Disconnect your node from the network after completing all obligations.
2. Unstake your CHZ:
   1. Access the [Chiliz Governance dApp](https://governance.chilizchain.com/staking).
   2. Navigate to the section where you manage your validator account.
   3. Initiate the process to unstake your CHZ. Keep in mind that unstaking may involve a cooldown period (up to 3 days) during which your CHZ will be locked before becoming available for claiming.
3. Notify delegators (if applicable):
   1. Inform any delegators staked to your validator node about your intention to stop operating as a validator. This allows them to reallocate their CHZ to other validators, and avoids disrupting their rewards.
4. Terminate your validator status
   1. Follow the specific steps outlined in the Governance dApp to deactivate your validator status.


# About Validator slashing

Chiliz Chain slashing penalties: Slashing Level 1 (missed blocks = lost epoch rewards) and Level 2 (extended downtime = 4-epoch jail), with unjail instructions.

## What is validator slashing?

Validator slashing is a penalty mechanism that is essential to maintaining network integrity.

In a Proof of Staked Authority (PoSA) blockchain such as Chiliz Chain, validators stake tokens and are selected based on reputation and staking amount.

{% hint style="info" %}
PoSA combines elements of the Proof of Stake (PoS) and the Proof of Authority (PoA) consensus mechanisms.
{% endhint %}

Validator slashing ensures that validators act responsibly and in Chiliz Chain's best interest. It therefore discourages malicious activities like missed blocks and prolonged downtime.

Slashing is crucial for aligning validators' behavior with the network's security and reliability.

## Validator penalties on Chiliz Chain

There are two possible penalties for validators: Missed Blocks and Extended Downtime.

{% hint style="info" %}
These penalties are cumulative: they are given when happening within the same epoch, with the validator node reaching Slashing Level 1, then Slashing Level 2.

This means that a validator node which reaches the second penalty (Slashing Level 2) already bears the consequences of the first penalty (Slashing Level 1).
{% endhint %}

The details for the two penalties are:

* **Missed Blocks penalty**: If a validator node misses `XXX` blocks per epoch (about a day), it loses the rewards for that epoch. This is Slashing Level 1.
* **Extended Downtime penalty ("jail")**: If a validator node misses `YYY` blocks per epoch, it has already lost the rewards for that epoch (Slashing Level 1), and further are "jailed" for 4 epochs (Slashing Level 2). The validator node owner will only be able to "release" the validator node after this period.

The penalties are calculated following these formulas:

* Slashing level 1:\
  `XXX = (Total nbr of blocks in an epoch / Total nbr of Validators) / 2`
* Slashing level 2:\
  `YYY = (Total nbr of blocks in an epoch / Total nbr of Validators) * 3/4`

## How to unjail a validator node

If your validator node is "jailed", you can "release" (unjail) it, provided that you have fixed the issue and waiting 4 epochs.

{% hint style="info" %}
Before you ask for a release, make sure that you have fixed the issue that brought your node to jail in the first place!

This might mean upgrading your node, or ensuring that anything that prevents it from being active is corrected.
{% endhint %}

To release your validator node from jail, you need to follow these steps:

1. Once you have fixed the initial issue for the node jailing, you need to wait 4 epochs (roughly 4-5 days).
2. After the 4 epochs have passed, connect your validator's owner wallet to the [Chiliz Staking dApp](https://governance.chilizchain.com/staking).
3. Click on the "Unjail" button, located here on the right:<br>

   <figure><img src="/files/mW7sXzhQHuluUSY4fTFT" alt=""><figcaption></figcaption></figure>
4. Enter the wallet address of the jailed node, and click "Submit".

<figure><img src="/files/9Wk8Bq1tr97DEuYOBvMk" alt="" width="359"><figcaption></figcaption></figure>

5. Your node will be released from jail and can be active again.

{% hint style="info" %}
Your node needs to wait for the next epoch to start producing blocks. At most it might take 24 hours.
{% endhint %}


# Validator Checklist

Complete checklist for Chiliz Chain validator operators: stake requirements, node setup specs, registration steps, ongoing obligations, and exit procedures.

This page gathers everything a validator operator needs to do, from first decision to eventual exit, in one checklist. Each item links to the detailed guide.

## Phase 1: Before you apply

* [ ] Confirm you can stake a minimum of **10 million CHZ**.
* [ ] Decide whether you will run your own node or use a third-party service.
* [ ] Understand how [rewards and commissions work](/learn/about-staking/staking-rewards).
* [ ] Understand [slashing risks](/learn/about-validators/about-validator-slashing): missed blocks cost you the epoch's rewards (Level 1), and extended downtime leads to a 4-epoch jail (Level 2).
* [ ] Be aware that your application is subject to a vote by the existing validator set.

## Phase 2: Node setup

Full instructions: [Running a Validator node](/learn/about-validators/running-a-validator-node)

* [ ] Server meets the system requirements: 2+ CPU cores, 4+ GB RAM, SSD with at least 300 GB free, 10 Gbps network bandwidth.
* [ ] Docker Engine is installed.
* [ ] Validator address is created.
* [ ] The secret key file is **backed up** and the key file password is stored in `password.txt`. Never share the secret key with anyone.
* [ ] A node key hex is generated and set via `--nodekeyhex` (recommended, for a stable enode address).
* [ ] `--nat=extip:<IP>` is set to your server's public IPv4 address.
* [ ] The node runs with `--syncmode=full` and `--gcmode=archive`, and is fully synced with the chain.

## Phase 3: Registration

Full instructions: [How to Become a Validator](/learn/about-validators/how-to-become-a-validator)

* [ ] Registration form submitted on the [Chiliz Governance dApp](https://governance.chilizchain.com/staking): node address, stake amount (≥ 10M CHZ), commission rate.
* [ ] Governance proposal launched by an existing validator and approved by the validator set.

## Phase 4: Ongoing operations

* [ ] Monitor your node's uptime: missed blocks lead to [Level 1 slashing](/learn/about-validators/about-validator-slashing) (lost epoch rewards).
* [ ] Know the [unjail procedure](/learn/about-validators/about-validator-slashing) in case your node gets jailed (Level 2 slashing).
* [ ] Keep your node software up to date with [hard forks and code changes](/chiliz-chain-changelog/blockchain-code-changes). Outdated validator nodes can disrupt the chain, and your rewards.

## Phase 5: If you exit

* [ ] To stop validating entirely, follow the [decommissioning steps](/learn/about-validators/how-to-stop-being-a-validator): clean shutdown, unstaking (with cooldown), and deactivation on the Governance dApp.
* [ ] To hand the node over instead, use the ["Change owner" procedure](/learn/about-validators/running-a-validator-node#changing-the-owner-of-a-node).


# About Fan Tokens

Overview of Fan Tokens on Chiliz Chain: CAP-20 standard (0-decimal ERC-20), Full token list, 2026 decimal migration, and 2023 migration from Chiliz Legacy Chain.

The most specific aspect of Chiliz Chain is Fan Tokens, based on the CAP-20 standard.

## Defining Fan Tokens

Fan Tokens are finite digital assets built on Chiliz Chain. They are foundational basis of the Socios.com app and its ecosystem.

Fan Tokens are CAP-20 tokens, specific to Chiliz Chain.\
While technically identical to the ERC-20 standard code-wise, CAP-20 tokens strictly use 0 decimals, instead of the usual 18 decimals.

More information here:

{% content-ref url="/pages/cqMxDMExW3MWm8QdRgCY" %}
[CAP-20](/learn/glossary/cap-20)
{% endcontent-ref %}

## List of Current Fan Tokens

You can find the complete list of Fan Tokens on this page:

{% content-ref url="/pages/7uoBCNloNbn76vHzrLrS" %}
[Token Contract Addresses](/quick-start/token-contract-addresses)
{% endcontent-ref %}

This page includes several details, such as:

* Token name
* Token ticker and logo
* Contract address for the supported chains: Chiliz Chain, Solana, Base.

## **Past Fan Token migrations**

### **2026: Migration to Decimal Fan Tokens**

{% content-ref url="/pages/ZGcKN2ssOh65O4mg6T02" %}
[2026 Migration to Decimal Fan Tokens](/learn/about-fan-tokens/2026-migration-to-decimal-fan-tokens)
{% endcontent-ref %}

### 2023: Migration from Chiliz Legacy Chain to Chiliz Chain

{% hint style="info" %}
As of September 2023, all Fan Tokens™ have been migrated from Chiliz Legacy Chain (CC1) to Chiliz Chain (CC2).\
The Chiliz Legacy Chain itself should be deprecated by end of Q1 2024.
{% endhint %}

Fan Tokens were initially on the Chiliz Legacy Chain, and were gradually moved to the new Chiliz Chain once it was released.

For greater transparency and partner convenience, we provided a detailed table indicating the specific migration dates for each Fan Token™ below. It was regularly updated while migration was ongoing.

{% content-ref url="/pages/wh1gmI61mqpJS0Dzuxj0" %}
[2023 Migration of Fan Tokens to Chiliz Chain](/learn/about-fan-tokens/2023-migration-of-fan-tokens-to-chiliz-chain)
{% endcontent-ref %}

It is now done. This section is kept for your information only.


# 2023 Migration of Fan Tokens to Chiliz Chain

Bridging Fan Tokens™ from Chiliz Legacy Chain to Chiliz Chain

<figure><img src="/files/fcoMxbE1O88Zs4nK9Pxu" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Chiliz Chain was launched in May 2023 as the successor to Chiliz Legacy Chain.

From June to September 2023, we migrated all Fan Tokens™ from Chiliz Legacy Chain to Chiliz Chain.\
The Chiliz Legacy Chain itself should be deprecated by end of Q1 2024.\
\
This page is kept for your information only.
{% endhint %}

Our migration was split into 3 steps:

1. Deployment of the Fan Token™ smart contracts on the new chain
2. Migration of the fan tokens within the Socios.com app to the Chiliz Chain
3. Opening up Withdrawals and Deposits of the fan tokens on the new network

You can check out all of the tokens minted on the new network here: <https://scan.chiliz.com/tokens>

**Schedule**

| Symbol  | Partner                          | Date       | Status                                                                                           |
| ------- | -------------------------------- | ---------- | ------------------------------------------------------------------------------------------------ |
| PRSJ    | PERSIJA                          | 19/06/2023 | [DONE](https://scan.chiliz.com/address/0xB6C7e13752c2d5C94B88A522696b6Dec380971eF)               |
| BENFICA | SL Benfica                       | 19/06/2023 | [DONE](https://scan.chiliz.com/token/0xad7c869F357B57BB03050183d1BA8eC465CD69Dc/token-transfers) |
| RIVER   | River Plate                      | 19/06/2023 | [DONE](https://scan.chiliz.com/token/0xD30596A49E8C416A9c180A4F1F2601D9fb1c2d23/token-transfers) |
| TIGERS  | Tigers                           | 21/06/2023 | [DONE](https://scan.chiliz.com/token/0x0b39ff3de07e8B6d2b97357d6F2A658ed7De52Cf/token-transfers) |
| HASHTAG | Hashtag United F.C.              | 21/06/2023 | [DONE](https://scan.chiliz.com/token/0x7Be4Aebc9900d2C1b628530ffc59416A98420B15/token-transfers) |
| SHARKS  | Sharks                           | 21/06/2023 | [DONE](https://scan.chiliz.com/token/0x1f5Ed1182b673338ECff0eeaB13ed79cEaf775f5/token-transfers) |
| SFP     | Stade Français                   | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0x2a89f8af25B01B837d67be3B1A162A663F77b26E)               |
| SARRIES | Saracens                         | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0x753DDA10c7b3069f0C90837dC3755c7c40A81B8c)               |
| QUINS   | Harlequins                       | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0x539e00D2487a06F3F08CDAF7Bf7A8b4a32C3a14E)               |
| BUFC    | BALI UNITED                      | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0xe87Cb1546D50F523057d3F94B07381dCE3F85eF9)               |
| STV     | Sint-Truidense Voetbalvereniging | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0xe446d966Ba9a36E518cF450AbbD22f45688107Da)               |
| UDI     | Udinese                          | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0xd2571bb5E84F1a3ac643b6be1dD94fC9fb97041d)               |
| PERSIB  | PERSIB                           | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0xC34BfBA5dB50152eF3312348A814D24F85748d64)               |
| ATLAS   | Atlas FC                         | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0x936AE5911F49634fD7f4F7385dB1613c5E350EdE)               |
| BAHIA   | EC Bahia                         | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0xE92e152fC0ff1368739670a5175175154Ceeef42)               |
| SEVILLA | Sevilla FC                       | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0x60a5E1f5f0071C5d870bB0A80B411BDe908AD51e)               |
| RSO     | Real Sociedad                    | 26/06/2023 | [DONE](https://scan.chiliz.com/address/0xdd03a533d6a309aFFF3053FE9Fc6C197324597bb)               |
| TIGRES  | Tigres                           | 10/7/2023  | [DONE](https://scan.chiliz.com/token/0xf17b1e028537aba705433f7cebdca881b5c5b79e)                 |
| MIBR    | MIBR                             | 10/7/2023  | [DONE](https://scan.chiliz.com/token/0xa8206af1e6a0289156d45b9d60e5bbd5d1fcf68d)                 |
| VERDAO  | Palmeiras                        | 10/7/2023  | [DONE](https://scan.chiliz.com/token/0x971364ec452958d4d65ba8d508faa226d7117279)                 |
| OG      | OG                               | 10/7/2023  | [DONE](https://scan.chiliz.com/token/0x19ca0f4adb29e2130a56b9c9422150b5dc07f294)                 |
| CPFC    | Crystal Palace                   | 10/7/2023  | [DONE](https://scan.chiliz.com/token/0xa70bd29bef2936765fe33b0f4b0cf8e947d75581)                 |
| TH      | Team Heretics                    | 12/7/2023  | [DONE](https://scan.chiliz.com/token/0x06b4213774dd069cf603ad11770b52f1e98160a7)                 |
| NAP     | Napoli                           | 12/7/2023  | [DONE](https://scan.chiliz.com/token/0xbe7f1ebb1fd6246844e093b04991ae0e66d12c77)                 |
| ITA     | FIGC                             | 12/7/2023  | [DONE](https://scan.chiliz.com/token/0x7483263ca24bfcff716a21f4a9bbf2610bdd9ec9)                 |
| LEG     | Legia Warsaw                     | 12/7/2023  | [DONE](https://scan.chiliz.com/token/0x3ce3946a68eb044c59afe77dfdfdc71f19eb4328)                 |
| EFC     | Everton Football Club            | 12/7/2023  | [DONE](https://scan.chiliz.com/token/0xabee61f8ff0eadd8d4ee87092792aaf2d9b2ca8e)                 |
| AVL     | Aston Villa                      | 17/07/2023 | [DONE](https://scan.chiliz.com/token/0x095726841dc9bf395114ac83f8fd42b176cfad10)                 |
| CAI     | Club Atletico Independiente      | 17/07/2023 | [DONE](https://scan.chiliz.com/token/0x8a48ad8279318757ea7905b460816c4b92de447e)                 |
| LUFC    | Leeds United FC                  | 17/07/2023 | [DONE](https://scan.chiliz.com/token/0xf67a8a4299f7ebf0c58dbfb38941d0867f300c30)                 |
| ATM     | Atlético de Madrid               | 17/07/2023 | [DONE](https://scan.chiliz.com/token/0xe9506f70be469d2369803ccf41823713bafe8154)                 |
| NAVI    | Natus Vincere                    | 17/07/2023 | [DONE](https://scan.chiliz.com/token/0x05765a792a04ecc6d45102b45874bc44a95a2d7e)                 |
| VASCO   | Vasco da Gama                    | 17/07/2023 | [DONE](https://scan.chiliz.com/token/0x6d72034d7508d16988bf84638d51592a8c02887b)                 |
| SACI    | Internacional                    | 17/07/2023 | [DONE](https://scan.chiliz.com/token/0x3175e779b42d35e2c9eeafadcf5b6e6ec6e4f910)                 |
| UFC     | UFC                              | 19/07/2023 | [DONE](https://scan.chiliz.com/token/0x0ffa63502f957b66e61f87761cc240e51c74cee5)                 |
| IBFK    | İstanbul Başakşehir FK           | 19/07/2023 | [DONE](https://scan.chiliz.com/token/0xd5febd04badd83e7ed56ca093fd57655b737cd3e)                 |
| TRA     | Trabzonspor                      | 19/07/2023 | [DONE](https://scan.chiliz.com/token/0x304193f18f3b34647ae1f549fc825a7e50267c51)                 |
| ASM     | AS Monaco                        | 19/07/2023 | [DONE](https://scan.chiliz.com/token/0x371863096cf5685cd37ae00c28de10b6edbab3fe)                 |
| POR     | Portugal National Team           | 19/07/2023 | [DONE](https://scan.chiliz.com/token/0xffad7930b474d45933c93b83a2802204b8787129)                 |
| DAVIS   | Davis Cup                        | 19/07/2023 | [DONE](https://scan.chiliz.com/token/0xf50b3db1d498b69b0dc8ccc0b03643009a6bda78)                 |
| APL     | Apollon Limassol FC              | 19/07/2023 | [DONE](https://scan.chiliz.com/token/0xb407a167fe99eb97970e41b2608d0d9484c489c8)                 |
| RACING  | Racing                           | 20/07/2023 | [DONE](https://scan.chiliz.com/token/0x06ed14a885d0710118fc20d51efdc151a48005b3)                 |
| ASR     | AS Roma                          | 20/07/2023 | [DONE](https://scan.chiliz.com/token/0xa6610b3361c4c0d206aa3364cd985016c2d89386)                 |
| YBO     | BSC Young Boys                   | 20/07/2023 | [DONE](https://scan.chiliz.com/token/0x0dc1776c56ffd3a046134be6fdc23a3214359329)                 |
| GALO    | Clube Atlético Mineiro           | 20/07/2023 | [DONE](https://scan.chiliz.com/token/0xe5274eb169e0e3a60b9dc343f02ba940958e8683)                 |
| SAUBER  | Alfa Romeo Racing ORLEN          | 20/07/2023 | [DONE](https://scan.chiliz.com/token/0xcf6d626203011e5554c82babe17dd7cdc4ee86bf)                 |
| FLU     | Fluminense FC                    | 20/07/2023 | [DONE](https://scan.chiliz.com/token/0x86930777d43605c40ba786f7802778ff5413efab)                 |
| SPFC    | São Paulo FC                     | 24/07/2023 | [DONE](https://scan.chiliz.com/token/0x540165b9dfdde31658f9ba0ca5504eda448bffd0)                 |
| GFK     | Gaziantep FK                     | 24/07/2023 | [DONE](https://scan.chiliz.com/token/0x2a5dbf10a9eb8d948aef256fde8e62f811624c4f)                 |
| ALA     | Alanyaspor                       | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0x863f7537b38130f01a42e9e9406573b1f1e309f7)                 |
| VCF     | Valencia CF                      | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0xba0c26485b1909f80476067272d74a99cc0e1d57)                 |
| PSG     | Paris Saint-Germain              | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0xc2661815c69c2b3924d3dd0c2c1358a1e38a3105)                 |
| ALL     | Alliance                         | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0xc5c0d1e98d9b1398a37c82ed81086674baef2a72)                 |
| BAR     | FC Barcelona                     | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0xfd3c73b3b09d418841dd6aff341b2d6e3aba433b)                 |
| UCH     | Universidad de Chile             | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0xa082ec45af038100d4989636a4a5e52fd7e5c636)                 |
| MFC     | Millonarios                      | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0xdeb5a271a67652a84decb6278d70a6d6a18d7c3b)                 |
| FOR     | Fortuna Sittard                  | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0x4b56f121f769bbdee3faba6e8b9163e7cffdd59a)                 |
| UECL    | UEFA Europa Conference League    | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0x7b34679bfb9b39d8c10b4d294a8fc390d0fc0a13)                 |
| UEL     | UEFA Europa League               | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0x53aff4f60e61ec64271c1f96d6ed2f31cf53052b)                 |
| UCL     | UEFA Champions League            | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0x13df7088471c4a2c3434382bfe34ed445357f5b6)                 |
| AM      | Aston Martin Cognizant           | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0x3757951792eDFC2CE196E4C06CFfD04027e87403)               |
| CITY    | Manchester City FC               | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0x6401b29F40a02578Ae44241560625232A01B3F79)               |
| GOZ     | Goztepe S.K.                     | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0x0E469D1C78421C7952E4D9626800DAd22F45361D)               |
| GAL     | Galatasaray S.K.                 | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0x6DaB8Fe8e5d425F2Eb063aAe58540aA04e273E0d)               |
| PFL     | Professional Fighters League     | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0xde05490B7AC4B86e54eFf43f4F809C3a7Bb16564)               |
| ENDCEX  | Endpoint CeX                     | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0x3F521D391E2aD0093d3BFABB2516F1C57d73B4d1)               |
| SAM     | Samsunspor                       | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0xfC21C38f4802Ab29Aed8cc7367542A0955CfA9D7)               |
| SAN     | Club Santos Laguna               | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0x44941A2d2049BE0ACB00Baf0A5dEE8931c33712E)               |
| ROUSH   | Roush                            | 09/08/2023 | [DONE](https://scan.chiliz.com/address/0xBA20eF1670393150d1C1b135F45043740ec3a729)               |
| LEV     | Levante                          | 09/08/2023 | [DONE](https://scan.chiliz.com/address/0x69D65E72266b15C2b2ABcD69561399D9BD1843Ef)               |
| BFC     | Bologna FC                       | 09/08/2023 | [DONE](https://scan.chiliz.com/address/0x319067E6253FdbF183C27AbcAF31d45aD50E98fF)               |
| DZG     | Dinamo Zagreb                    | 16/08/2023 | [DONE](https://scan.chiliz.com/address/0x6412aFDFdF2a465B2E2464A5F9d1743a9CFfd6fF)               |
| INTER   | Inter FC                         | 16/08/2023 | [DONE](https://scan.chiliz.com/address/0xc727c9C0f2647CB90B0FCA64d8ddB14878716BeD)               |
| ARG     | Argentina                        | 17/08/2023 | [DONE](https://scan.chiliz.com/address/0xd34625c1c812439229EF53e06f22053249D011f5)               |
| JUV     | Juventus                         | 23/08/2023 | [DONE](https://scan.chiliz.com/address/0x454038003a93cf44766aF352F74bad6B745616D0)               |
| ACM     | AC Milan                         | 24/08/2023 | [DONE](https://scan.chiliz.com/address/0xF9C0F80a6c67b1B39bdDF00ecD57f2533ef5b688)               |
| AFC     | Arsenal FC                       | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0x1d4343d35f0E0e14C14115876D01dEAa4792550b)               |
| MENGO   | Flamengo                         | 26/07/2023 | [DONE](https://scan.chiliz.com/token/0xd1723eb9e7c6ee7c7e2d421b2758dc0f2166eddc)                 |
| VIT     | Vitality                         | 07/08/2023 | [DONE](https://scan.chiliz.com/address/0x1754bbc90F8C004EDBaCC59e41AA4be7a36B5D5b)               |
| SCCP    | Corinthians                      | 24/08/2023 | [DONE](https://scan.chiliz.com/address/0x20BFeab58f8bE903753d037Ba7e307fc77c97388)               |


# 2026 Migration to Decimal Fan Tokens

Guide to the 2026 Fan Token upgrade to 18-decimal precision: migration portal, CEX vs. self-custody steps, and status table of all migrated Fan Token V2 contracts.

<figure><img src="/files/Jrk8q8gfsCCvwZfw7D3q" alt=""><figcaption></figcaption></figure>

Fan Tokens™ now feature 18 decimal precision and are aligned with blockchain industry standards for digital assets, making them more versatile and accessible.

It’s a significant technical upgrade to Fan Tokens™, enabling fractional ownership and greater integration with decentralised applications, wallets and exchanges.

## Process

Making the upgrade is free and straightforward thanks to our online tool:

{% embed url="<https://app.fantokens.com/>" %}

You may have to undergo the upgrade process multiple times depending on which Fan Tokens you are holding.

## FAQ

### Do I need to do anything if my Fan Tokens are on a centralised exchange?

No, most of the centralized exchanges will do migration on your behalf. Please keep following this page to see the progress of the migration for a given token.

{% hint style="info" %}
While most exchanges will do the migration for you, please make sure to follow any communication or guidance on that subject that your exchange might share.
{% endhint %}

### What if I hold my Fan Tokens in a self-custodial wallet (MetaMask, OKX Wallet)?

It’s your responsibility to complete this migration process. You need to connect your app with [our migrational portal](https://app.fantokens.com/) and proceed with the migration yourself.

It will automatically deduct all the balance of the Fan Token from your wallet and send you back the same amount as decimal version of the new Fan Token within a minute.

### How to add Fan Tokens into self-custodial wallet after the migration?

If new Fan Tokens do not appear in your wallet even after completing the migration process, you need to add the token manually in your wallet then it will show up as a decimal version with the new contract address.

See for instance:

{% embed url="<https://support.metamask.io/manage-crypto/portfolio/how-to-import-a-token-in-metamask-portfolio>" %}

## For Socios.com Wallet users

Users of the Socios.com Wallet can find more infos in this page:

{% embed url="<https://www.socios.com/fan-token-upgrade/>" %}

{% hint style="warning" %}
The instructions and details provided in the Socios.com FAQs apply strictly to the upgrading process of Fan Tokens when done via the Socios.com Wallet.\
The upgrading process of decimal Fan Tokens on any other platform may be subject to different instructions, fees, or requirements.
{% endhint %}

## Status of the Upgrade

**Global status as of Q2 2026:**\
**All fan tokens have now been fully migrated to their decimal contracts.**

<table data-full-width="true"><thead><tr><th>Fan Token ($TICKER)</th><th>New V2 contract address</th><th>Date of migration completion</th></tr></thead><tbody><tr><td>Chivas ($CHVS)</td><td><a href="https://scan.chiliz.com/token/0x3624BA092480fb0bDB5ec50EbaC699BdFa561416">Here</a></td><td>Q3 2025</td></tr><tr><td>Novara Calcio ($NOV)</td><td><a href="https://scan.chiliz.com/token/0x8aC4144247A17515A065fbe4C8Ad21b16aD866C7">Here</a></td><td>Q3 2025</td></tr><tr><td>Atlas FC ($ATLAS)</td><td><a href="https://scan.chiliz.com/token/0xc1A2b6950786383114828FCF816199b6d5f4960A">Here</a></td><td>Q4 2025</td></tr><tr><td>Bali United ($BUFC)</td><td><a href="https://scan.chiliz.com/token/0xafb78165c62744bd21B4DDef48c11A93D395dAa2">Here</a></td><td>Q4 2025</td></tr><tr><td>Bologna FC ($BFC)</td><td><a href="https://scan.chiliz.com/token/0xD77de9fcE56F371e347217D57394f1Fa07F02d64">Here</a></td><td>Q4 2025</td></tr><tr><td>BSC Young Boys ($YBO)</td><td><a href="https://scan.chiliz.com/token/0x8c4d631A673bE24F244E4f0645BE6928d0083d4e">Here</a></td><td>Q4 2025</td></tr><tr><td>Davis Cup ($DAVIS)</td><td><a href="https://scan.chiliz.com/token/0x97B79Dd60A1211A9612f98194591F4483FF83cE3">Here</a></td><td>Q4 2025</td></tr><tr><td>Dinamo Zagreb ($DZG)</td><td><a href="https://scan.chiliz.com/token/0x03bE2eA82839FBD8b6ab16aDdEba3FE4C88bB43F">Here</a></td><td>Q4 2025</td></tr><tr><td>Endpoint CeX ($ENDCEX)</td><td><a href="https://scan.chiliz.com/token/0x4CF8426c1D90a505dcb8D96c4F295494a548f4a2">Here</a></td><td>Q4 2025</td></tr><tr><td>Fortuna Sittard ($FOR)</td><td><a href="https://scan.chiliz.com/token/0x078B3C0Ad7Ea92EfD14Af146bf4171E80cE41e1C">Here</a></td><td>Q4 2025</td></tr><tr><td>Harlequins ($QUINS)</td><td><a href="https://scan.chiliz.com/token/0x110A0fC65a0f78840f4b4A04A42e8c285E424553">Here</a></td><td>Q4 2025</td></tr><tr><td>Hashtag United FC ($HASHTAG)</td><td><a href="https://scan.chiliz.com/token/0x3c1487C5036105338396055d74EeE505a9F6A2f3">Here</a></td><td>Q4 2025</td></tr><tr><td>Johor Darul Ta'zim ($JDT)</td><td><a href="https://scan.chiliz.com/token/0x9aF2bD7003f043124AA13A21a2460996F7Ba9a3B">Here</a></td><td>Q4 2025</td></tr><tr><td>Leicester Tigers ($TIGERS)</td><td><a href="https://scan.chiliz.com/token/0xc430fFb62961Ff910181eDcAE34aE9Fc418a15cE">Here</a></td><td>Q4 2025</td></tr><tr><td>Levante UD ($LEV)</td><td><a href="https://scan.chiliz.com/token/0x084Ba7f44Cd799dECDe593A4045170f014c29845">Here</a></td><td>Q4 2025</td></tr><tr><td>Millonarios FC ($MFC)</td><td><a href="https://scan.chiliz.com/token/0x580edA966a8129C3c01D149871B47feFcC599D28">Here</a></td><td>Q4 2025</td></tr><tr><td>PERSIB ($PERSIB)</td><td><a href="https://scan.chiliz.com/token/0xDD15623d107c639aF0C5127AFFA26d3f20327EC8">Here</a></td><td>Q4 2025</td></tr><tr><td>Racing Club ($RACING)</td><td><a href="https://scan.chiliz.com/token/0x02300475d1EdD5b2E88EFdeBD3fFb549110D8Aa6">Here</a></td><td>Q4 2025</td></tr><tr><td>Roush Fenway Racing ($ROUSH)</td><td><a href="https://scan.chiliz.com/token/0xAe0E559cfB64191e376317895f1d643df22d8dD7">Here</a></td><td>Q4 2025</td></tr><tr><td>Santos FC ($SAN)</td><td><a href="https://scan.chiliz.com/token/0x3BA1eB0FF58537d8b77E8446273295fC432439A9">Here</a></td><td>Q4 2025</td></tr><tr><td>Saracens ($SARRIES)</td><td><a href="https://scan.chiliz.com/token/0x72B1FCA1008BE96C4fdE2539379c1778A76c4fCa">Here</a></td><td>Q4 2025</td></tr><tr><td>Sharks ($SHARKS)</td><td><a href="https://scan.chiliz.com/token/0x0cb13408921F87E3A3D011b03935A81A1542bDFa">Here</a></td><td>Q4 2025</td></tr><tr><td>Sint-Truidense V.V ($STV)</td><td><a href="https://scan.chiliz.com/token/0x71Bc882c60b9EfDf85D0E1A28Fc86f0BD822132F">Here</a></td><td>Q4 2025</td></tr><tr><td>Stade Français Paris ($SFP)</td><td><a href="https://scan.chiliz.com/token/0x04aa2d5c46691f05D30b9E65a9E09C8ea383c7B0">Here</a></td><td>Q4 2025</td></tr><tr><td>Team Vitality ($VIT)</td><td><a href="https://scan.chiliz.com/token/0x94A54b796744f07cfB499E2b6050F8b71A012c2c">Here</a></td><td>Q4 2025</td></tr><tr><td>Universidad de Chile ($UCH)</td><td><a href="https://scan.chiliz.com/token/0xFe050a08699a2557bCc0A8E6C2805eBA55D61065">Here</a></td><td>Q4 2025</td></tr><tr><td>Apollon Limassol ($APL)</td><td><a href="https://scan.chiliz.com/token/0x0B00E360BEE5557D0D9A548030AA8f7182daF56f">Here</a></td><td>Q4 2025</td></tr><tr><td>Aston Villa ($AVL)</td><td><a href="https://scan.chiliz.com/token/0x4F3a607bB2717683108865fc785BadFa90094431">Here</a></td><td>Q1 2026</td></tr><tr><td>Benfica ($BENFICA)</td><td><a href="https://scan.chiliz.com/token/0xF4c653b74929953B29B966aBA99b681Fb5ab69cF">Here</a></td><td>Q1 2026</td></tr><tr><td>Club Atletico Independiente ($CAI)</td><td><a href="https://scan.chiliz.com/token/0x99F7b1f8d445b6CBD231017820DE372e2c5f9a27">Here</a></td><td>Q1 2026</td></tr><tr><td>Fluminense ($FLU)</td><td><a href="https://scan.chiliz.com/token/0x9840dC03032f4F35d7DBdc8dB832aCFAF6Ff3e77">Here</a></td><td>Q1 2026</td></tr><tr><td>Gaziantep FK ($GFK)</td><td><a href="https://scan.chiliz.com/token/0x72b30f41D5163A5082f9461f0B8346789639e063">Here</a></td><td>Q1 2026</td></tr><tr><td>MIBR ($MIBR)</td><td><a href="https://scan.chiliz.com/token/0x8CAf9018Aa56f7Db55bB353005C7aa0FBfb1736b">Here</a></td><td>Q1 2026</td></tr><tr><td>Natus Vincere ($NAVI)</td><td><a href="https://scan.chiliz.com/token/0x02728748392F1875682940681F4C936Fc683A68e">Here</a></td><td>Q1 2026</td></tr><tr><td>Real Sociedad ($RSO)</td><td><a href="https://scan.chiliz.com/token/0x53838837f258f8Ef337C8b4CEb60a89190EcBa8B">Here</a></td><td>Q1 2026</td></tr><tr><td>Samsunspor ($SAM)</td><td><a href="https://scan.chiliz.com/token/0xf78E9Ce916a7D6b3d4FaCbA95b9e9b8BbA5df609">Here</a></td><td>Q1 2026</td></tr><tr><td>S.C. Internacional ($SACI)</td><td><a href="https://scan.chiliz.com/token/0x4c360BE766dD95c973bE30c4130E7b4B762113E0">Here</a></td><td>Q1 2026</td></tr><tr><td>SE Palmeiras ($VERDAO)</td><td><a href="https://scan.chiliz.com/token/0xb46357d8Ed050D35D3a24154c39d7236dAE86187">Here</a></td><td>Q1 2026</td></tr><tr><td>Udinese Calcio ($UDI)</td><td><a href="https://scan.chiliz.com/token/0x94772c3381A83308376d65e100D06C2bc5a86eD9">Here</a></td><td>Q1 2026</td></tr><tr><td>UFC ($UFC)</td><td><a href="https://scan.chiliz.com/token/0xC9f723625e80a81cBa2CAd3e6871D3bdf2a7ECC7">Here</a></td><td>Q1 2026</td></tr><tr><td>Valencia CF ($VCF)</td><td><a href="https://scan.chiliz.com/token/0x83d7D1df01C698b4379077aF4bCEB2D4AF113BfF">Here</a></td><td>Q1 2026</td></tr><tr><td>Vasco da Gama ($VASCO)</td><td><a href="https://scan.chiliz.com/token/0xD5f1B2454db115967bfAc73bFEa21Da5e2543c8E">Here</a></td><td>Q1 2026</td></tr><tr><td>Tigres ($TIGRES)</td><td><a href="https://scan.chiliz.com/token/0x7308F4c7b4a9a0E180fD08C003255762DD139D54">Here</a></td><td>Q1 2026</td></tr><tr><td>Team Alliance ($ALL)</td><td><a href="https://scan.chiliz.com/token/0x109b738569A04eA31CA06B47aF06CfdDa87ADF48">Here</a></td><td>Q1 2026</td></tr><tr><td>AC Milan ($ACM)</td><td><a href="https://scan.chiliz.com/token/0x062F6004FD0BF204D272Ff115E5b84F7A01489D1">Here</a></td><td>Q2 2026</td></tr><tr><td>Alanyaspor ($ALA)</td><td><a href="https://scan.chiliz.com/token/0x3B60F483fe311FC063b50A67BF327F96B76696E6">Here</a></td><td>Q2 2026</td></tr><tr><td>Alfa Romeo Racing ORLEN ($SAUBER)</td><td><a href="https://scan.chiliz.com/token/0xE64c9D1471cFb5e7b03c998AC8137b441c60AF6D">Here</a></td><td>Q2 2026</td></tr><tr><td>Argentina ($ARG)</td><td><a href="https://scan.chiliz.com/token/0x4394886B1eec08Fe88681462914702dC99D97Eb7">Here</a></td><td>Q2 2026</td></tr><tr><td>Arsenal FC ($AFC)</td><td><a href="https://scan.chiliz.com/token/0x76088F3eD5dC655De9295D93868ec1EeC654A615">Here</a></td><td>Q2 2026</td></tr><tr><td>AS Monaco ($ASM)</td><td><a href="https://scan.chiliz.com/token/0x57F3D2382025cF5d6c3B126dcE0360D9Cf3AfF49">Here</a></td><td>Q2 2026</td></tr><tr><td>AS Roma ($ASR)</td><td><a href="https://scan.chiliz.com/token/0x0Ac7bf9783CA1dcd86A39B5a2607160D29256EB0">Here</a></td><td>Q2 2026</td></tr><tr><td>Aston Martin Aramco Cognizant F1® Team ($AM)</td><td><a href="https://scan.chiliz.com/token/0xf0D5De46729f4E2F28c27a98E15Ef18dF951Ec44">Here</a></td><td>Q2 2026</td></tr><tr><td>Atlético de Madrid ($ATM)</td><td><a href="https://scan.chiliz.com/token/0x7da0eB973D982FFcA095E80437F5e37459a95C67">Here</a></td><td>Q2 2026</td></tr><tr><td>Clube Atlético Mineiro ($GALO)</td><td><a href="https://scan.chiliz.com/token/0x558Cc7Ac99793B10c1C142a1C7e5AdF6657DeA9c">Here</a></td><td>Q2 2026</td></tr><tr><td>Corinthians ($SCCP)</td><td><a href="https://scan.chiliz.com/token/0x25fb4ff916faFb88d78918c54C1d14B57586046b">Here</a></td><td>Q2 2026</td></tr><tr><td>Crystal Palace ($CPFC)</td><td><a href="https://scan.chiliz.com/token/0x58613484D9683d52899e13d42BB3fb9eEB0749da">Here</a></td><td>Q2 2026</td></tr><tr><td>EC Bahia ($BAHIA)</td><td><a href="https://scan.chiliz.com/token/0xc75037B67Ade9364F451D49bfAE776619a292181">Here</a></td><td>Q2 2026</td></tr><tr><td>Everton Football Club ($EFC)</td><td><a href="https://scan.chiliz.com/token/0xa84E55C2464563441cb4114372DF8D5aca49Fc83">Here</a></td><td>Q2 2026</td></tr><tr><td>FC Barcelona ($BAR)</td><td><a href="https://scan.chiliz.com/token/0x1589248b4B61ed472cc21CA1F2114d93ab6910D5">Here</a></td><td>Q2 2026</td></tr><tr><td>FC Internazionale Milano ($INTER)</td><td><a href="https://scan.chiliz.com/token/0x1b3385A26214057bB7e27c173ee2D14201752e73">Here</a></td><td>Q2 2026</td></tr><tr><td>FIGC ($ITA)</td><td><a href="https://scan.chiliz.com/token/0x90111A53D94efe28F34562b53F04F471522d57b3">Here</a></td><td>Q2 2026</td></tr><tr><td>Flamengo ($MENGO)</td><td><a href="https://scan.chiliz.com/token/0xBfF8FaBb04f6494fe393EB7416A698869569A310">Here</a></td><td>Q2 2026</td></tr><tr><td>Galatasaray S.K. ($GAL)</td><td><a href="https://scan.chiliz.com/token/0x770da1e5dDB22f3Ccc2482493BD9B10A7A8A38Ae">Here</a></td><td>Q2 2026</td></tr><tr><td>Göztepe S.K. ($GOZ)</td><td><a href="https://scan.chiliz.com/token/0x6ba1FB0dAdAEB34ea24EB31d416805abE8921448">Here</a></td><td>Q2 2026</td></tr><tr><td>İstanbul Başakşehir FK ($IBFK)</td><td><a href="https://scan.chiliz.com/token/0x7B69003C404B0579F257c16E2664b4Eb4c7b2acf">Here</a></td><td>Q2 2026</td></tr><tr><td>Juventus ($JUV)</td><td><a href="https://scan.chiliz.com/token/0xeAf368DAdC22524deF47E8A1C26bFC17AC16E6F5">Here</a></td><td>Q2 2026</td></tr><tr><td>Leeds United FC ($LUFC)</td><td><a href="https://scan.chiliz.com/token/0xE3ECD48f7653e6da693B544d50caB0BCdCd35C13">Here</a></td><td>Q2 2026</td></tr><tr><td>Legia Warsaw ($LEG)</td><td><a href="https://scan.chiliz.com/token/0xFd8A11532c5Ca9bec64ec86e4E5ed78089CD443f">Here</a></td><td>Q2 2026</td></tr><tr><td>Manchester City FC ($CITY)</td><td><a href="https://scan.chiliz.com/token/0x7Bd6242D775fAEf1d50B2aA18C2FBF329BDDF295">Here</a></td><td>Q2 2026</td></tr><tr><td>Napoli ($NAP)</td><td><a href="https://scan.chiliz.com/token/0x90593E9602b38A0D5b63d9f34AC3560798cEE7d4">Here</a></td><td>Q2 2026</td></tr><tr><td>OG ($OG)</td><td><a href="https://scan.chiliz.com/token/0xb3f2E39Acc68F98229B2587361a8cE30aCDf0442">Here</a></td><td>Q2 2026</td></tr><tr><td>Paris Saint-Germain ($PSG)</td><td><a href="https://scan.chiliz.com/token/0xFe1d4A935df7A4A52F835f6104C97AF9D72217f2">Here</a></td><td>Q2 2026</td></tr><tr><td>Portugal National Team ($POR)</td><td><a href="https://scan.chiliz.com/token/0x013F2407c6eF765F1199f8818B805121F269F5b8">Here</a></td><td>Q2 2026</td></tr><tr><td>Professional Fighters League ($PFL)</td><td><a href="https://scan.chiliz.com/token/0x3444F5436A3C02F3a3dB8f2436b02BC1EEa950d6">Here</a></td><td>Q2 2026</td></tr><tr><td>Sevilla FC ($SEVILLA)</td><td><a href="https://scan.chiliz.com/token/0xA584cca6a5C46ead6FF8EF3beB8FAC76364c36Cb">Here</a></td><td>Q2 2026</td></tr><tr><td>São Paulo FC ($SPFC)</td><td><a href="https://scan.chiliz.com/token/0x6345c0ECcA1B9007a9043CB5da8150aE07adD498">Here</a></td><td>Q2 2026</td></tr><tr><td>Team Heretics ($TH)</td><td><a href="https://scan.chiliz.com/token/0x0b5De9e1303F3FB4F67D1ACA1503DDB28Bf59834">Here</a></td><td>Q2 2026</td></tr><tr><td>Tottenham Hotspur ($SPURS)</td><td><a href="https://scan.chiliz.com/token/0xd699ACD21011c20381E5138A430bb0d7b6E9BC7F">Here</a></td><td>Q2 2026</td></tr><tr><td>Trabzonspor ($TRA)</td><td><a href="https://scan.chiliz.com/token/0xEff432433Dd57AdFA37004af00DB148F9407e7bD">Here</a></td><td>Q2 2026</td></tr></tbody></table>


# About Stablecoins

Overview of stablecoins on Chiliz Chain, including USDT and USDC bridged via Chainport, with links to supported stablecoin contracts.

Stablecoins are digital currencies designed to maintain a steady value by being pegged (or affixed) to real-world assets, such as the US dollar.

Unlike most cryptocurrencies, stablecoins offer price stability, making them ideal for trading, holding, and transferring funds without significant value changes.

Stablecoins maintain value through backing by reserves, such as fiat currency (e.g., USDT, USDC) or over-collateralized cryptocurrencies. Some rely on algorithms to adjust supply.

See the link the table of stablecoins available on the Chiliz Chain:

{% content-ref url="/pages/OlWIxWX7j0CUu0nDzpve" %}
[Stablecoins on Chiliz Chain](/learn/about-stablecoins/stablecoins-on-chiliz-chain)
{% endcontent-ref %}


# Stablecoins on Chiliz Chain

Reference table of stablecoins on Chiliz Chain: AUSD0, BRZ, USDC, and USDT with contract addresses, bridge options (Chainport, Stargate), and purchase links.

Here is a list of all stablecoins currently available on Chiliz Chain.

| Name                  | Official site                                   | Pegged to      | Smart Contract                                                                                | Bridges                                                                                                      | Buy on Chiliz Chain                                        |
| --------------------- | ----------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- |
| AUSD0                 | [Visit](https://www.agora.finance/product/ausd) | US Dollar      | [View](https://scan.chiliz.com/token/0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a)              | [Stargate](https://stargate.finance/?srcChain=chiliz\&srcToken=0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a)   | n/a                                                        |
| BRZ (Brazilian Token) | [Visit](https://transfero.com/brz)              | Brazilian Real | [View](https://scan.chiliz.com/token/0xE9185Ee218cae427aF7B9764A011bb89FeA761B4?tab=contract) | n/a                                                                                                          | [With Transfero](https://transfero.com/brz)                |
| USDC (US Dollar Coin) | [Visit](https://www.circle.com/usdc)            | US Dollar      | [View](https://scan.chiliz.com/token/0xa37936F56249965d407E39347528a1A91eB1cbef?tab=contract) | [Chainport](https://app.chainport.io/?srcToken=0xa37936f56249965d407e39347528a1a91eb1cbef\&srcNetwork=88888) | n/a                                                        |
| USD₮ (Tether)         | [Visit](https://tether.to/)                     | US Dollar      | [View](https://scan.chiliz.com/token/0x37C57a89812a0D492AeEd7691F1610CA0a8f74A1?tab=contract) | [Chainport](https://app.chainport.io/?srcToken=0x37c57a89812a0d492aeed7691f1610ca0a8f74a1\&srcNetwork=88888) | [With Kayen Finance](https://app.kayen.finance/trade/swap) |

See also:

{% content-ref url="/pages/JRmjRQBbpT4agvQGxaAP" %}
[Bridging stablecoins](/learn/about-bridging/bridging-stablecoins)
{% endcontent-ref %}


# About DAOs

Guides on creating and running DAOs on Chiliz Chain using Aragon, with use-cases for Fan Token communities: fan councils, stadium experience, and treasury governance.

What if you wanted to create an online organisation that's collectively owned and managed by its members, without a CEO or central leader?

In the blockchain world, that is called a **Decentralized Autonomous Organization (DAO)**: an internet-native community where the rules are coded in transparent smart contracts. Instead of a hierarchy, decisions are made through group voting, giving every member a voice in the organisation's future, and control over its shared treasury.

## Why build a DAO on Chiliz Chain?

Building a DAO enables your project to establish transparent, community-owned governance directly within the CHZ ecosystem. It is the most effective way to give fans genuine ownership and a direct voice.

A DAO can transform your project's Fan Token from a simple tool for polls into a key for community ownership and governance. Instead of just participating in club-sanctioned votes, a can DAO empower fans to create their own initiatives, manage the Fan Token treasury, and govern the project affairs transparently.

There are several possible use-cases for DAOs in sports communities:

* Fan Council DAO:\
  Allow the community to act as an official digital fan council. Members could vote on specific issues to present to the club's board, elect fan representatives for official meetings, or ratify a "Fan's Charter" of expectations for the club.
* Stadium Experience DAO:\
  Allow the community to vote on aspects of the match-day experience, such as the pre-game music playlist, food vendors for a specific fan zone, or the design of a tifo display, with the DAO managing the budget for these initiatives.
* "Up-and-Coming "Athlete Support DAO:\
  Allow the community to sponsor a promising young athlete from the club's academy or a local hero. The community pools funds to support their training and career, in exchange for exclusive content or future incentives.
* Shared Season Ticket DAO:\
  Allow the community to purchase a block of highly-sought-after season tickets. Members would then use a fair, transparent voting or lottery system managed by the DAO to decide who gets to use the tickets for each game.
* etc.

Imagine what a DAO could bring to your Fan Token community!

## Our How-Tos

{% content-ref url="/pages/cNtmINe0I88kBrpUQvaV" %}
[How to create your own DAO](/learn/about-daos/how-to-create-your-own-dao)
{% endcontent-ref %}

{% content-ref url="/pages/MqnCNIDrAD3OoCh6wsNI" %}
[How to run a DAO](/learn/about-daos/how-to-run-a-dao)
{% endcontent-ref %}


# How to create your own DAO

Create a DAO on Chiliz Chain in minutes using Aragon's no-code interface: connect your wallet, select the Chiliz network, and publish your DAO.

There are several tools to help you create your own Decentralized Autonomous Organization (DAO).

This page focuses on those compatible with Chiliz Chain, starting with Aragon.

## How to create a DAO using Aragon

[Aragon](https://www.aragon.org/) is an [open-source](https://github.com/aragon/app) platform that simplifies the creation and management of DAOs. With their No-Code DAO Launch feature, they allows users to create DAOs without writing any code. This makes it accessible to a wider audience beyond just developers.

Here are the steps:

1. Go to [the Aragon app](https://app.aragon.org/) and connect with your Web3 wallet.
2. Click the "Create a DAO" button.
3. Aragon indicates the coming steps. Click "Get started".\
   ![](/files/GPFvbrNAa9rLmJcWdA2x)
4. In the list of chains, select "Chiliz" and click "Next".<br>

   <figure><img src="/files/qSREf8Z7AopvvhKhJo80" alt=""><figcaption></figcaption></figure>
5. Describe your DAO: Name, logo, etc.<br>

   <figure><img src="/files/he4vS8MFh5fw0x0WEjQq" alt=""><figcaption></figcaption></figure>
6. Click "Publish DAO". A modal appears, listing the steps:\
   ![](/files/kwwBpQ7IbUsyd5ubfjIn)
7. Click "Sign transaction". Your wallet will open with a transaction request, which you need to confirm.
8. Once confirmed, Aragon will continue with the needed steps, until it allows you to view your DAO.\
   ![](/files/lnVFC4rPKgcGFzFX2Ee4)
9. Click the "View DAO" button. Aragon takes you to your DAO's dashboard.

Congratulations! You can now run your own DAO in Chiliz Chain!


# How to run a DAO

Best practices for running a Chiliz Chain DAO: governance design, voting models, tokenomics, treasury management, proposal quality, and avoiding voter apathy and whale domination.

[Launching a DAO](/learn/about-daos/how-to-create-your-own-dao) is just the first step. Running it effectively, in a healthy and community-centric way, requires preparation and active management of its governance, community, and treasury. This means having knowledge of common pitfalls as well as best practices.\
We've tried to gather the necessary information in this page.

*Note that other guides exist online, which you can take inspiration from:*

{% embed url="<https://www.aragon.org/how-to/build-manage-and-grow-your-dao-community>" %}

{% embed url="<https://www.legalnodes.com/article/dao-legal-stages>" %}

{% embed url="<https://www.wearedevelopers.com/en/magazine/169/how-to-create-dao-guide>" %}

## Before You Start

Launching a DAO is exciting, but rushing into it without preparation can lead to decision deadlocks, voter apathy, or even security risks. Before deploying your DAO smart contracts, make sure you’ve addressed a few key questions.

### What's the DAO's Purpose?

Begin by crafting a concise "mission statement" for your DAO. This means defining its purpose in one or two sentences.\
For example, "The XYZ DAO will manage the treasury of the XYZ Fan Token project, funding community initiatives and granting rewards to supporters."

Next, define the scope of the DAO: what the DAO *can* and *cannot* decide on. This could includes areas such as token supply changes, budget allocations, potential partnerships, etc.

Finally, define the longevity of your DAO. Is it short-term (tied to a specific event), or designed to be permanent?

### How will the Community Work?

Once you’ve defined the purpose of your DAO, the next step is to decide how decisions will actually be made. This is called a "governance", and it's the backbone of your organization. Poorly-designed governance rules can quickly lead to community stagnation or conflicts.

Start by choosing a membership and voting model: the simplest is *1 token = 1 vote*, though this risks dominating by "whales" (those who own a large amount of tokens). Alternatives like "quadratic voting" (fairer for small holders) or "delegated voting" (members entrust votes to active representatives) can help balance power. You'll need to explore options.

Next, set quorum and thresholds so that proposals can’t pass with too little participation. For example, you can require a minimum turnout and decide whether proposals pass by simple majority or "supermajority". Finally, design a clear proposal process: from drafting, to community discussion, to on-chain voting. This ensures legitimacy and transparency.

### What About the Tokenomics?

A cryptocurrency project's tokenomics (token+economics) explains the design and distribution of its native digital tokens.

Here is Chiliz' own tokenomics for the CHZ token explained, for instance:

{% content-ref url="/pages/LqkVo2xmi02KJyykaFpT" %}
[Tokenomics](/learn/about-chiliz-chain/tokenomics)
{% endcontent-ref %}

In case of a DAO's tokenomics, it should ensure that governance or Fan Tokens are fairly distributed so that participation isn’t dominated by a few holders. Think about incentives: Whether voting, proposing, or contributing should be rewarded to keep members engaged.

Plan for the DAO’s treasury funding as well, whether through token sales, allocations, or fees.

Above all, avoid concentration of power: a DAO where most tokens sit idle in a handful of wallets isn’t truly decentralized.

### Other Aspects to Explore

Beyond governance and tokenomics, there are two areas often overlooked when launching a DAO: technical readiness and legal awareness.

On the **technical side**, always test your setup on Spicy Testnet before moving to Chiliz Mainnet, and ensure critical actions like treasury transfers use secure multisig wallets. Good key management (ideally with hardware wallets) is essential to protect DAO admins and signers.

On the **legal side**, DAOs operate in a gray zone that varies by jurisdiction. Some countries treat them as partnerships or unincorporated associations, while token issuance may trigger securities or financial regulations. Even if your DAO aims to stay lightweight, it’s wise to publish a simple risk disclosure or charter so members know the boundaries and responsibilities.

Taking time to address these "non-governance" aspects upfront reduces both technical risks and regulatory surprises.

## The Core of a DAO

Even in a decentralized structure, a certain leadership is critical for a DAO's health and sustainability. Leadership does not mean to have a single leader, but responsibilities to be distributed among active contributors.

### Governance Launch

As a project founder, your aim in creating a DAO is to give your community full autonomy and decentralization. However, this is unfeasible in early development stages, as many concepts require testing. To maintain flexibility and enable rapid iteration, manual intervention in smart contract operation is necessary.

Early manual interventions could be for instance:

* In case of low participation, you might need to adjust quorum, voting periods, or proposal rules.
* In case of poorly-framed proposals, you might need to manually executing or relaunching stalled proposals.
* For safety reasons, the DAO's treasury might be held in a founder-controlled multisig for a while.
* etc.

### Community Engagement

At the core of any DAO is its community. When setting up a DAO for your project, there are key community activities that you should have a plan for:

* Onboarding:\
  Create clear instructions for new members on how to acquire your project's tokens, participate in discussions, and vote on proposals.
* Communication:\
  Maintain active communication channels (e.g., Discord, Telegram, or a online forum like Discourse) to discuss proposals, announce voting periods, and share results transparently
* Culture:\
  Foster a collaborative and constructive environment where members feel empowered to contribute.

### Governance Management

This involves managing the lifecycle of proposals, which are the primary mechanism for making decisions.

* Proposal Pipeline:\
  Establish a clear process for a proposal, from an initial idea discussed in the community to a formal on-chain vote.
* Clarity and Standards:\
  Ensure that proposals submitted for a vote are clear, well-defined, and contain all necessary information for members to make an informed decision.
* Parameter Reviews:\
  Periodically, the DAO should review its own governance parameters (e.g., vote duration, quorum thresholds) and propose adjustments if necessary.

### Treasury Oversight

The DAO's treasury is meant to be its collective resource. Prudent management is essential for long-term success.

You will need:

* Transparency:\
  Provide regular, easy-to-understand reports on the state of the treasury, including income and expenditures, to the DAO's community. All transactions are public on the Chiliz Scan explorer, but summarizing them is helpful.
* Budgeting:\
  Propose operational budgets for initiatives, contributor rewards, and other recurring expenses.
* Security:\
  Ensure treasury funds are secured, typically through a multi-signature (multisig) wallet controlled by trusted community members or the DAO itself, requiring multiple approvals for transactions.

## DAO Best Practices

Strong governance is the engine of a successful DAO. Follow these best practices to ensure your decision-making process is robust and effective.

### **Crafting High-Quality Proposals**

A well-crafted governance proposal is essential and must include a clear title, a concise abstract, and a detailed motivation outlining the problem or opportunity.

The proposal should also feature a comprehensive specification with technical details, costs, and timelines, a strong rationale for the chosen solution, and measurable expected outcomes.

Failed that, you could lose the trust of your community

### **Encouraging Voter Participation**

Voter apathy is the death-knell of a DAO. It's up to leadership to combat it.

Here are proven strategies:

* Ensure ample discussion time for proposals, allowing for a "temperature check" before an on-chain vote.
* Use all communication channels (X.com, Telegram, Discord, etc.) to clearly announce new proposals and their voting deadlines.
* Make complex technical proposals more accessible, with summaries and explainers for all members.

You could also consider small voting incentives to help encourage participation. This idea should be approached with great care.

### **Managing Contributor Rewards**

The DAO's valuable asset (besides its treasury) is its active contributors. A formal system to reward them ensures that the DAO's work gets done.

There are two main funding mechanisms that can be used for the DAO's members and projects:

* Bounties can be used to fund specific, one-off tasks.
* Grants can support larger, member-led projects that align with the DAO's mission.

Additionally, contributor stipends can provide recurring payments to individuals or groups performing essential, ongoing functions, with all such payments requiring approval via a governance vote.

## DAO Common Pitfalls

This table serves as a summary of all that we described so far.

| Pitfall                    | Description                                                                                                                         | Mitigation Strategy                                                                                                                                       |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Voter Apathy               | Consistently low turnout on proposals, which can stall decision-making and lead to governance by a small minority.                  | Implement strong communication practices. Simplify proposals and ensure members understand the impact of their vote. Ensure quorum levels are realistic.  |
| Poor Proposal Quality      | Vague or incomplete proposals are put to a vote, leading to confusion, wasted treasury funds, or unintended consequences.           | Enforce a standardized proposal template. Require a community discussion and feedback period before any on-chain vote.                                    |
| Whale Domination           | A small number of token holders (whales) have enough voting power to control the outcome of every vote, defeating decentralization. | Encourage wide token distribution from the start. Consider governance models like quadratic voting (if supported) that reduce the power of large holders. |
| Operational Security Risks | DAO members are targeted by phishing scams, or treasury funds are compromised through poor private key management.                  | Educate members on security best practices. Use a multisig for treasury management. Never ask members for their private keys.                             |


# Glossary

Blockchain glossary for Chiliz Chain covering CAP-20, PoSA consensus, governance, staking, validators, wallets, and wrapped CHZ (wCHZ).

On this page you will find an explanation of key terms from the blockchain world.

{% content-ref url="/pages/VaYPZdhZLuzpTEvpXomQ" %}
[Blockchain](/learn/glossary/blockchain)
{% endcontent-ref %}

{% content-ref url="/pages/nv2PPoAK5PqCB5QFH4PG" %}
[Governance](/learn/glossary/governance)
{% endcontent-ref %}

{% content-ref url="/pages/gjEQQemSAZR7WDrR3lwQ" %}
[Validator](/learn/glossary/validator)
{% endcontent-ref %}

{% content-ref url="/pages/VSoPweXgSRjyYJbmskPL" %}
[Staking](/learn/glossary/staking)
{% endcontent-ref %}

{% content-ref url="/pages/muSUqTbcCRMVS1I5SgD9" %}
[Wallet](/learn/glossary/wallet)
{% endcontent-ref %}

{% content-ref url="/pages/cqMxDMExW3MWm8QdRgCY" %}
[CAP-20](/learn/glossary/cap-20)
{% endcontent-ref %}


# Blockchain

A general information about blockchain and what it is made up of

## Overview

Blockchain technology is a highly secure, decentralized, and unchangeable system. It is composed of data records, called "blocks". Each block holds the record of a transaction (or even several transactions).

These blocks are linked to each other, in a way that each one depends on the previous one, using a unique signature called "cryptographic hash". Each block is therefore related to the previous block.

{% code overflow="wrap" %}

```
Block = Data (sender, receiver, and amount to be sent) 
        + Hash (the unique signature) 
        + Hash of the previous block 
```

{% endcode %}

<figure><img src="/files/10B1IJkZ9bWzlyRD061K" alt=""><figcaption></figcaption></figure>

This allows every user in the system to examine and confirm the blocks, ensuring openness, accuracy, and dependability. All transactions are checked and agreed upon by all users in the system, through "network consensus".

This makes a blockchain an online and transparent ledger system: hence, it is trustworthy in terms of security, integrity, immutability, and reliability.

## Components of Blockchain

### Genesis block

A Genesis block is the first block in a blockchain, known as "Block 0". It doesn't have a previous hash but generates a unique hash for the next block, starting the chain of blocks.

The second block uses the previous hash and produces a hash for the next block. This cycle goes on for as long as new blocks are added.

### Hash

Each block has a hash, a unique signature, linking it to the next block. The hash is the result of a complex calculation based on both the hash from the previous block, the content of the current block, and a timestamp.

This way, transactions can be validated through their hash: if a block is been modified by a third-party, then the hash from the next block is not a reflection of the previous block anymore, and it is easy to see that a "hack" has been made.

### Accounts

Accounts are digital records for managing cryptocurrency, allowing users to send, receive, and hold digital money (such as crypto coins or tokens).

An account is necessary in order to handle cryptocurrency.

There are two types of accounts:

1. *Externally owned:* this type of account can be operated and controlled by those having private keys. It's a free account through which transactions can be initiated.
2. *Contract:* this type of account is controlled by the code deployed on your network. A fee is charged as the contract runs on the external network, and charges are incurred for storage. You cannot initiate a transaction however, you can only send transactions against your received transactions.

Usually, both account types can transact and interact with smart contracts.

### Transactions

Transactions are digital records of all activities in a cryptocurrency [wallet](/learn/glossary/wallet), similar to bank transactions. They include details like the unique transaction ID, sender and receiver addresses, transaction value, and fees.

### Gas fees

These are charges for completing transactions or running smart contracts on the blockchain. The fee varies and may increase if the network is busy

Gas fees, or "gas", are charges required to successfully complete a transaction or run a smart contract on the blockchain. It's also a remuneration given to the miners for checking and validating transactions on the blockchain.

The gas fee varies from transaction to transaction. For instance, you may have to pay more gas fees if the network is busy or loaded with a high volume of transactions on the block.

### Nodes

Every computer attached a given blockchain network must agree on each new additional block and on the entire chain. These computers, called "nodes," ensure that everyone using the blockchain has identical information.

They use a special process to reach this agreement in a distributed way: a [consensus mechanism](/learn/glossary/consensus-mechanisms).

### Smart contracts

Smart contracts are digital agreements stored on a blockchain. They are sets of coded rules that execute actions when certain conditions are met. The action could result in exchanging coins or NFTs, for instance.

A smart contract is just a custom script that can be deployed in the blockchain. Most smart contract are written using the Solidity programming languages, which takes inspiration from Python, C++, and JavaScript.

Once set up, smart contracts generally can't be changed, but there are ways to update them with new features or fixes.

### Mining

Mining is how new cryptocurrencies are made, and also how transactions are confirmed before being added to the blockchain. Using cryptographic calculations, nodes validate and secure each transaction on the blockchain. This ensures the security of the blockchain

Mining is done using powerful networked computers, called [nodes](#nodes), which are owned by "miners". Miners invest heavily in this process and, in return, earn rewards from the blockchain.

### Uncle blocks, or Ommer blocks

Sometimes, two miners produce blocks at the same time. Only one block can be officially added to the blockchain; the others, known as "Uncle blocks," are not used.

### Block explorer

A block explorer is a tool for viewing real-time activity on your digital account and the blockchain. It lets you check transactions, view data on blocks, and see other blockchain activities like cryptocurrency exchanges and mining.


# Consensus mechanisms

Glossary definitions for Proof of Stake (PoS), Proof of Staked Authority (PoSA), and Proof of Work (PoW) consensus mechanisms, with context for Chiliz Chain's Parlia engine.

## Consensus mechanism

Cryptocurrencies use blockchain as their database; therefore the consensus mechanism secures blockchain by validating entries into the blockchain thus ensuring the utmost security of all transactions. There are mainly three types of consensus mechanisms most prevalent in validating transactions; Proof of Stake, Proof of Staked Authority, and Proof of Work elaborated as follows:

### Proof of Stake, aka PoS

Proof of Stake is a consensus mechanism to process transactions and create or add new blocks to the blockchain. [Validators](/learn/glossary/validator) stake a certain amount of crypto as security to validate transactions on the blockchain. The system randomly picks validators to perform mining tasks, which is completely opposite to how the Proof of Work works. As a reward, validators get paid the transaction fees.

In PoS, blocks get assigned according to the stake pledged by validators. Rather than competing to be the first in finding the necessary amount of preceding zeros for a block hash, blocks are pre-assigned to validators.

Each of the consensus mechanisms has its own merits and limitations. However, PoS is supposed to be more environment-friendly than PoW as it doesn’t call for investing in the setup and/or consuming massive amounts of electricity.

{% hint style="info" %}
***Why PoS is preferred?***

With proof-of-stake, the blockchain is kept secure by reducing the amount of computational work required for block verification and transaction verification. Each of the consensus mechanisms has its own merits and limitations. However, PoS is said to be more environment-friendly than PoW as it doesn’t call for investing in the setup and/or consuming massive amounts of electricity.
{% endhint %}

{% hint style="info" %}
***How does PoS work?***

Proof of stake randomly selects validators who have pledged their stake to verify transactions and add new blocks to the blockchain. PoS is said to be more economical consensus mechanism than PoW in terms of infrastructure and setup.

As there are certain factors required by PoS to work, it may incur a lot of expenses. For example, a full-fledged processing and storage unit corresponding to the size of your blockchain is required to run a full node.
{% endhint %}

{% hint style="info" %}
***The downsides of Proof of Stake***

One of the notable downsides of PoS is it encourages lobbying/hoarding of stakes. The larger crypto shares a party holds, the more will be their influence, irrespective of the consensus. This itself to some extent dismantles the idea of a decentralised framework and also fair trade the blockchain across the globe works on.
{% endhint %}

{% hint style="info" %}
***About Delegated Proof-of-Stake, aka DPoS***

With Delegated Proof of Stake (DPoS), interested parties pledge some amount of token to become validators. These validators create and validate blocks of transactions on the blockchain.
{% endhint %}

### Proof-of-Staked Authority, aka PoSA

PoSA has been widely used by many cryptocurrency networks or validators as an inherent consensus mechanism. Utilising a cryptocurrency client that participates in PoSA validation or becoming a validator in a way helps to secure the network and earn rewards.

```
PoSA Consensus Mechanism = Proof-of-Stake (PoS) 
                           + Proof of Authority (PoA)
```

From that baseline of the EVM compatibility, Chiliz Chain introduces a system of 11 validators with the Proof-of-Staked Authority (PoSA) consensus that supports shorter block time and lower fees. The most bonded validator candidates of staking then become the validators and start producing blocks.\
Moreover, the double-sign detection and other slashing logic further guarantee security, stability, and chain finality.

### Proof of Work, aka PoW

Proof of Work is another type of consensus mechanism. It validates, approves, and records all cryptocurrency transactions before adding to the blockchain. It potentially slows down the creation of new blocks. Proof of work assures secured transactions with no security breaches. It gives miners an opportunity to earn block rewards also in the form of crypto coins.

{% hint style="info" %}
***How does PoW work?***

Every transaction comes with a transaction hash, here, the miner has to produce a hash similar to that of a target hash. Miners (specialised computers) aim to be the first ones at solving the equation.

Much similar to the video games we play, the complexity of mining gets tougher if these puzzles are solved in less time. Also, more complex puzzles can call for more rewards. That said, there is no structure or format to demonstrate how a mining algorithm works.
{% endhint %}

## Decentralised Application aka dApps

dApps is short for a Decentralised Application. It is built on a decentralised network, which connects a frontend user interface with a smart contract. Usually, dApps have open APIs and as a developer, you can possibly use existing smart contracts or templates coded by others.

## Fungible tokens

Cryptocurrencies are the perfect example of fungible tokens since they have the same value as another coin of the same type at a given point. The fungible properties of cryptocurrencies are indicated by the code script/smart contracts. They can be divided into parts and are not unique.

{% hint style="info" %}
**GOOD TO KNOW**

Fan tokens are fungible tokens.
{% endhint %}

## Non-fungible tokens aka NFTs

Non-fungible tokens aka NFTs can be in the form of digital assets such as art, music, games, video games, rare collectibles, and so on. NFTs represent ownership of (mostly) unique items, which can be bought, sold, transferred, and even created. Since these tokens are stored on the blockchain, every transaction has its digital record on the blockchain, which allows creators to prove not only ownership but also authenticity of these assets.

The main similarity between NFTs and cryptocurrency is that they both are built on the blockchain and use similar programming languages.


# Governance

Chiliz Chain governance explained: Compound Alpha governance model, ⅔ quorum requirement, validator voting power, custom voting periods, and proposal lifecycle.

### Overview

The governance system contract is based on the default implementation of the Compound’s Alpha governance, where voting power depends on the total delegated amount of the validator. The validator’s owner is responsible for voting in favour of or against the proposals on governance. Presently, the required quorum to be reached is ⅔.

#### Under which circumstances is the proposal applied?

Chiliz implements the default **Compound’s Alpha governance**, where voting power is distributed amongst validators' owners based on their total delegated amount. Once a quorum of ⅔ is reached, a proposal can be applied.

This governance is fully compatible with the compound's version. However, it has only one improvement: it allows proposal creation with a custom voting period.

For some methods, it is important to have a shorter voting period. For example, when some emergency actions need to be applied.\
To achieve this, we can extend the original implementation by adding the method `proposeWithCustomVotingPeriod`. This allows for specifying the voting period for the proposal.

#### Under which circumstances is the proposal defeated?

Once the quorum is reached and more than 50% of voting power is given for the proposal then it can be executed right after the voting period is done. If a proposal can’t reach the required quorum in the voting period then it becomes defeated.

### Consensus params

{% code overflow="wrap" lineNumbers="true" %}

````
```solidity
struct ConsensusParams {
    uint32 activeValidatorsLength;
    uint32 epochBlockInterval;
    uint32 misdemeanorThreshold;
    uint32 felonyThreshold;
    uint32 validatorJailEpochLength;
    uint32 undelegatePeriod;
}
```
````

{% endcode %}

### BSC compatibility

Chiliz Chain is compatible with BSC and Parlia consensus. In an EVM executor, the only new additions are the hooks for checking ACL policies, which are about 40 lines of code.


# Validator

Validator glossary entry: PoSA block producers on Chiliz Chain, selection criteria based on staked CHZ, cryptographic signing, and reward distribution.

### Overview

Since a blockchain is based on [<mark style="color:blue;">consensus mechanism</mark>](/learn/glossary/consensus-mechanisms), it becomes evident to have an integrated protocol on how new blocks will be committed on the blockchain. Blockchain validators are basically computer systems dedicated to maintain security and integrity of the blockchain.

Validator nodes run a program on transactions and further decide the order in which the blocks would sit on the blockchain. Each validator contributes to the consensus protocol by signing blocks containing cryptographic signatures using their private keys.

Thus, by using a distributed consensus protocol, validator nodes process transactions, run them on the blockchain, and save results on the blockchain.

## PoSA and validators - a general overview <a href="#gmail-overview" id="gmail-overview"></a>

Proof of Staked Authority (PoSA) is one of the consensus mechanisms that run with the help of validators who commit new blocks on the blockchain. A validator node helps to stake your cryptocurrency on the blockchain.

A validator is selected from the pool of validators based on the amount staked or contributed. Once selected, the validator is responsible for authenticating new transactions and updating the blockchain. In return, the validator earns rewards through transaction fees and commissions.

There's a criterion for how a validator is selected. From the pool, participants who have spent considerable time and staked higher amounts are selected to validate transactions and rewarded thereafter. The validator's block must then need an attestation for the accuracy of other validators before the transaction is confirmed on the blockchain. For this job, the reward (which could be the native cryptocurrency) is then distributed amongst the validators proportionately to the amount they've pledged.

### The criteria for becoming a validator:

As a volunteer validator, you must:

* dedicate a system (computer) to verify and upkeep the integrity of the blockchain.
* add a certain amount of stake to the pool.

## Candidates

Candidates are a set of inactive validators that remain as a backup apart from the active validators. Candidates are also responsible for validating blocks in case the active validators go offline or are inactive.

## Slashing <a href="#gmail-what-is-slashing" id="gmail-what-is-slashing"></a>

Becoming a validator comes with a huge responsibility as they have to pledge or contribute their crypto share to stand a chance to validate and commit blocks on the blockchain. That said, validators might lose a significant amount of stake due to the slashing process in the form of a penalty.

A validator's stake might get slashed if a bad block is committed to the blockchain. Similarly, if a validator node fails to commit blocks on time (or is offline or inactive), a node is charged with a small amount as a penalty. However, this penalty is not as severe as slashing.

### Double-sign slashing <a href="#gmail-double-sign-slashing" id="gmail-double-sign-slashing"></a>

A validator is "double-sign slashed" when more than one block is committed using their validator keys at the same time.


# Staking

Staking glossary for Chiliz Chain: delegation logic, CHZ locking, validator/delegator roles, Parlia compatibility, and decentralized staking platform overview.

## Overview

Staking is a contract created to manage an active validator set.

It implements delegation logic that allows users to vote for the best validators. It brings decentralisation into blockchain and allows users to gain rewards by voting for the most honest and stable validators. This is because the Annual Percentage Rate (APR) primarily depends on the stability of the validator.

### Compatibility

The staking contract is fully compatible with the original Parlia’s validator set contract.

## **Decentralised Staking Platform**

Staking is an integral part of the consensus mechanism. Likewise, the Chiliz Chain depends on a robust structure of validators that help in reducing gas fees and shorten block time. A common consensus mechanism used by blockchains is based on Proof of Stake (PoS).

Staking allows CHZ holders to contribute to the network by locking their assets on the chain. There are two different roles in staking, namely Validators and Delegators. They are also the participants in the Chiliz Chain staking model.

**Validators** must run a node and stake a large amount of native tokens to create and validate blocks.

**Delegators** are able to contribute to a validator's staking pool with a much lower amount of tokens, allowing communities with fewer CHZs to participate in the network.

### **Rewards**

The reward for each block comes from the gas fees spent on all transactions in the block. These rewards are then split between three entities:

* The validators who created the block,
* The delegators of the same validator's pool,
* and the network.


# Epoch

Epoch glossary entry: Chiliz Chain's fixed time unit of 28,800 blocks (\~1 day) on Mainnet, governing validator elections, reward distribution, and unstaking cooldowns.

## What is an epoch?

An epoch is a fixed period of time on a blockchain, measured in blocks rather than hours or minutes.

On Chiliz Chain:

* **Chiliz Mainnet**: 1 epoch = 28,800 blocks, or approximately **1 day**.
* **Spicy Testnet**: 1 epoch = 7,200 blocks, or approximately **6 hours**.

{% hint style="info" %}
Block production time can vary slightly, which is why epoch durations are approximate. The block count is the source of truth, not the clock.
{% endhint %}

## What happens at the end of an epoch?

Epochs act as the heartbeat of Chiliz Chain's Proof of Staked Authority (PoSA) consensus. Epoch boundaries are when the chain updates its validator-related state, including:

* **Refreshing the active validator set**, taking into account each validator's total staked CHZ.
* **Distributing staking rewards** to validators and their delegators.

## Why do epochs matter to me?

If you stake CHZ, epochs determine when you can claim unstaked tokens: after unstaking on Chiliz Mainnet, you must wait for the remainder of the current epoch plus 2 full epochs (roughly 3 days) before claiming.

Learn more:

{% content-ref url="/pages/eSRJkSJDtouV2AkxaJwW" %}
[Unstake your CHZ](/learn/about-staking/unstake-your-chz)
{% endcontent-ref %}

{% content-ref url="/pages/Wb9wAJtwJOttSCvK39G4" %}
[Defining Validators and Delegators](/learn/about-validators/defining-validators-and-delegators)
{% endcontent-ref %}


# Wallet

Good-to-know information about crypto wallets

### Overview

A crypto wallet is useful for those who want to store, transfer, and exchange cryptocurrency. It is like a digital wallet: you can see past and real-time transactions.

Crypto wallets save sets of your crypto keys that are essential for regular transactions. These private keys can help in sending, receiving, and keeping track of your cryptocurrency and ownership thereafter.

Unlike traditional bank accounts, you have an option to select mobile applications or computer programs as your wallets.

## Wallet address, aka public key

The wallet address is a set of unique alphanumeric strings and assigned only to the wallet-holder. It is similar to any regular address used to exchange cryptocurrencies or NFTs. It is impossible to make a transaction without having a wallet address.

Unlike the private key, you can openly share your wallet address just like you'd share your email address.

### How do I find my wallet address?

To find your wallet address, choose one option from the following:

*Option 1:*

Open your MetaMask Wallet and select your **Account**. You can copy your wallet address by clicking on the alphanumeric string and use it further by pasting the already copied wallet ID where required.

<figure><img src="/files/XiUrSlqMlw8JYb2NO8sF" alt=""><figcaption></figcaption></figure>

*Option 2:*

1. Open the 3-dot menu and select *Account details*.

<figure><img src="/files/ZE600ChhJNsrydwEOsaF" alt=""><figcaption></figcaption></figure>

2\. The account details will pop-up. You can use either the QR code or the wallet address by copying the ID.

![](/files/x2PvKMBkAwXA2M6u9w9A)

## Types of wallet

### Hardware wallet, aka cold (or cold storage) wallets

The hardware wallet is a physical device much similar to a private key token (such as RSA token). It holds the private key required to access your account on the blockchain.

Since the hardware wallet doesn't require to be connected to any digital device such as computers, chances of your account being hacked are low. Hence, the hardware wallet is widely considered as the preferred way of keeping your private keys and account safe.

However, the major downside of the hardware wallet is the cost involved; it can go hard on your pocket to buy and maintain a hardware wallet.\
In case you lose your hardware wallet, only the wallet's seed phrase can be used to access your account from then on. Consider yourself lucky if you have saved or written that seed phrase and kept it safe.

### Software wallet, aka hot wallets

Web wallets can be easily accessible using your computer (using a browser extension for instance) or mobile applications. Web wallets are extremely convenient to use. You can transact, check your account balance, and manage your account on the go.

You are required to enter credentials to access your wallet. You must strictly keep your passwords safe at all times, especially, the seed phrase. **Do not share this confidential information at any given situation**. The Chiliz team will *never* ask you for your password or seed phrase.

## Key management

Mobile applications and browser extensions can be used to manage digital private keys.


# CAP-20

CAP-20 (Chiliz Advancement Proposal 20) explained: Chiliz Chain's ERC-20 equivalent token standard, used for Fan Tokens with 0 decimals instead of the usual 18.

## **What is CAP-20?**

In the blockchain world, xxx-20 refers to token standards inspired by Ethereum's ERC-20 standard.\
For instance, [BEP-20](https://academy.binance.com/en/glossary/bep-20) is the standard token for [BNB Smart Chain](https://www.bnbchain.org/en/bnb-smart-chain) ([BSC](https://github.com/bnb-chain/bsc)), and likewise, CAP-20 is the equivalent of ERC-20 for Chiliz Chain.

{% hint style="info" %}
"CAP" is short for "Chiliz Advancement Proposal".
{% endhint %}

## First, what is ERC-20?

[ERC-20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) is the most common token standard on the Ethereum blockchain.

A token standard is a set of rules that tokens must follow to work properly on a blockchain.\
These rules include how the tokens can be transferred/spent, how transactions are approved, how users can access data about a token, and the total supply of the token.

Following ERC-20 ensures that different tokens can interact with each other in a predictable way on Ethereum, making it easier for developers to create new tokens that will work well with wallets, exchanges, and other smart contracts.

In simple terms, ERC-20 is like a common language that all tokens on the Ethereum network use to understand each other and work together smoothly.

## Now, what is CAP-20?

CAP-20 is the standard for Fan Tokens on Chiliz Chain.

While it follows the ERC-20 basic features, it also extends it to support a wider range of tokens.

Fan Tokens (or "CAP-20 tokens") are essentially ERC-20 token, but:

* They run on Chiliz Chain, not Ethereum,
* Therefore they use $CHZ, not $ETH,
* The default of a Fan Token has 0 decimals, while the standard of ERC-20 has 18 decimals.

Tokens created on different blockchain platforms can be adjusted or linked to Chiliz Chain through a process called bridging. Learn more about [Chiliz Bridge](/learn/about-bridging).


# Wrapped CHZ (wCHZ)

Wrapped CHZ (wCHZ) explained: ERC-20/CAP-20 tokenized version of native CHZ, peg mechanics, use in DeFi and bridging, and how to wrap/unwrap on Chiliz Bridge.

{% hint style="info" %}
**In short**\
Wrapped Chiliz (wCHZ) is a tokenized version of the Chiliz cryptocurrency, designed to work like regular ERC-20 tokens while keeping its original value. This makes it more versatile and useful for developers, similar to other wrapped tokens like wETH or Wrapped BNB.
{% endhint %}

## What Is Wrapped Chiliz (wCHZ)? <a href="#header-0" id="header-0"></a>

wCHZ is the wrapped version of Chiliz.

Wrapped tokens, such as wCHZ and wETH, are tokenized versions of cryptocurrencies that are pegged to the value of the original coin and can be unwrapped at any point. Almost every major blockchain has a wrapped version of its native cryptocurrency like Wrapped BNB, Wrapped AVAX, or Wrapped Fantom.

The benefits of this is that developers are able to use an ERC-20 (or CAP-20) version of the native token CHZ, giving the token the benefits that other ERC20 tokens posses and removes the limitations of a native token, while retaining the same price value as the original CHZ.

## How do I get wrapped Chiliz (wCHZ)?

Read it all here:

{% content-ref url="/pages/asZ8uyn2pYREdfp9o1AP" %}
[Use Wrapped CHZ](/develop/basics/use-wrapped-chz)
{% endcontent-ref %}


# Develop

Developer documentation hub covering Chiliz Chain basics (RPC, deployment, verification) and advanced integrations with Biconomy, Pyth, LayerZero, and more.

This section is aimed at tech users and developers who are ready to get their hands dirty.

The "Basics" subsection gives you access to information that you would use regularly as a blockchain developer

{% content-ref url="/pages/N7NZ7L8V6V99Sl5bSfq0" %}
[Basics](/develop/basics)
{% endcontent-ref %}

The "Advanced" subsection makes use of third-party tools or frameworks which will help get results faster. These includes Biconomy and Pyth for now, with more to come.

{% content-ref url="/pages/k3k8t3WktzBirPzxiALl" %}
[Advanced](/develop/advanced)
{% endcontent-ref %}


# Basics

Core developer reference for Chiliz Chain: RPC connection, hardware wallets, smart contract deployment, verification, testnet faucets, and block explorers.


# Connect to Chiliz Chain

Connect to Chiliz Chain Mainnet or Spicy Testnet via public RPC endpoints (HTTP/WebSocket) or by running your own node.

There are two ways to connect your project to Chiliz Chain:

* Using an RPC endpoint -- Mainnet or Testnet.
* Running your own Chiliz Chain node.

You can use RPC endpoints to interact with a node directly over HTTP or websockets.

{% content-ref url="/pages/oYKKHjOmAZJp2Vfye0kX" %}
[Connect using RPC](/develop/basics/connect-to-chiliz-chain/connect-using-rpc)
{% endcontent-ref %}

You can also run your own Chiliz Chain node, which provides greater control and privacy but demands more technical skill and resources.

{% content-ref url="/pages/9YZsEmPaaQYP2h1RqyS1" %}
[Run a Chiliz Chain Node](/develop/basics/connect-to-chiliz-chain/run-a-chiliz-chain-node)
{% endcontent-ref %}

If you are a Chiliz Chain Validator, here a guide on how to run your own validator node:

{% content-ref url="/pages/ppcymFdm3NKLps6cECR9" %}
[Running a Validator node](/learn/about-validators/running-a-validator-node)
{% endcontent-ref %}


# Connect using RPC

Chiliz Chain Mainnet (chain ID 88888) and Spicy Testnet (chain ID 88882) RPC endpoint URLs, WebSocket connections, explorer links, and rate limit guidance.

Chiliz is available through a Mainnet for your production projects, and has a Testnet for testing purposes. The Chiliz Testnet is called Spicy Testnet.

{% hint style="success" %}
These public RPC endpoints are free and shared, so they come with rate limits. The exact limit depends on the provider and whether you have registered an account with them: the public endpoints (no account needed) are fine for development and testing, while production traffic is better served by registering with a provider for higher limits, or by [running your own node](/develop/basics/connect-to-chiliz-chain/run-a-chiliz-chain-node).

If you do hit a limit, add a short delay between requests (ranging from 1 second to 1 minute depending on your needs), and use exponential backoff on errors rather than retrying immediately.
{% endhint %}

{% tabs %}
{% tab title="Chiliz Chain Mainnet" %}

<table><thead><tr><th width="253">Parameter</th><th width="346">Value</th></tr></thead><tbody><tr><td>Network Name</td><td>Chiliz Chain</td></tr><tr><td>RPC endpoint</td><td>Recommended:<br><a href="https://rpc.ankr.com/chiliz">https://rpc.ankr.com/chiliz</a><br><br>Alternatives:<br><a href="https://chiliz-mainnet.gateway.tatum.io">https://chiliz-mainnet.gateway.tatum.io</a><br><a href="https://chiliz-rpc.publicnode.com">https://chiliz-rpc.publicnode.com</a></td></tr><tr><td>RPC Websocket</td><td>wss://chiliz-rpc.publicnode.com</td></tr><tr><td>Chain ID</td><td>88888</td></tr><tr><td>Currency Symbol</td><td>CHZ</td></tr><tr><td>Chiliz Block Explorer URL</td><td>Recommended:<br><a href="https://chiliscan.com">https://chiliscan.com</a><br><br>Alternative:<br><a href="https://scan.chiliz.com">https://scan.chiliz.com</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Spicy Testnet" %}

<table><thead><tr><th width="253">Parameter</th><th width="312">Value</th></tr></thead><tbody><tr><td>Network Name</td><td>Spicy Testnet</td></tr><tr><td>RPC endpoint</td><td>Recommended:<br><a href="https://spicy-rpc.chiliz.com/">https://spicy-rpc.chiliz.com/</a><br><br>Alternatives:<br><a href="https://chiliz-testnet.gateway.tatum.io">https://chiliz-testnet.gateway.tatum.io</a><br><a href="https://chiliz-spicy-rpc.publicnode.com">https://chiliz-spicy-rpc.publicnode.com</a></td></tr><tr><td>RPC Websocket</td><td>Recommended:<br>wss://spicy-rpc-ws.chiliz.com/<br><br>Alternative:<br>wss://chiliz-spicy-rpc.publicnode.com</td></tr><tr><td>Chain ID</td><td>88882</td></tr><tr><td>Currency Symbol</td><td>CHZ</td></tr><tr><td>Spicy Block Explorer URL</td><td><p>Recommended:<br><a href="https://testnet.chiliscan.com/">https://testnet.chiliscan.com/</a></p><p><br>Alternative:<br><a href="https://spicy-explorer.chiliz.com/">https://spicy-explorer.chiliz.com/</a></p></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

There you will find Mainnet and Testnet endpoint URLs, Chain ID, explorer URL, etc.

{% hint style="info" %}
**About the Scoville Testnet**

In May 2023, we replaced Scoville Testnet with Spicy Testnet.

All developers who have deployed or plan to deploy on Scoville Testnet must deploy their tests on Spicy Testnet instead as it will be kept up-to-date to directly reflect the new Chiliz Chain.
{% endhint %}

For information on how to connect specific wallets to Chiliz Chain, please use this guide: [Link Chiliz Chain and MetaMask](/learn/about-wallets/how-to-use-metamask/link-chiliz-chain-and-metamask).


# Run a Chiliz Chain Node

Launch, create, connect, and debug a node to sync with Chiliz Chain

Running your own Chiliz Chain node offers enhanced control, privacy, and reliability, but requires more technical expertise and resources compared to using an existing RPC endpoint.

It allows you to transact and communicate with smart contracts on the Chiliz Chain

{% hint style="info" %}
Note that there's a Validator-specific node-running documentation page: [Running a Validator node](/learn/about-validators/running-a-validator-node)
{% endhint %}

## **Prerequisites**

To run the Chiliz Chain node, you must have [Docker](https://www.docker.com/) installed, either on your machine or your server. Therefore, please complete the [Docker installation](https://docs.docker.com/engine/install/) before you proceed.

### **Pre-built Docker images**

You can use the pre-built Docker images from the [Chiliz Chain 2.0 public repository on the Docker hub](https://hub.docker.com/repository/docker/chilizchain/ccv2-geth).

## **Launch a node and start the sync**

The recommended starting point to run a Chiliz Chain node is with the mounted data volume. If this method is used to recreate a Docker container, the data gets stored in the directory and can easily be reused or cloned to another node.

### **Step 1: Create a Directory**

Create a directory and point to it in the `-v` parameter in the following command:

```bash
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 8545:8545 \
-p 8546:8546 \
chilizchain/ccv2-geth:latest \
--chiliz # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
--datadir=/datadir \
--ipcdisable
```

### **Step 2: Connect Client**

To connect a client with a node, you must enable RPC HTTP and/or the WebSocket servers by specifying `--http` and/or `--ws` parameter groups respectively.

For example:

```bash
docker run \
-v $(pwd)/my-datadir:/datadir \
--name ccv2-node \
-p 8545:8545 \
-p 8546:8546 \
chilizchain/ccv2-geth:latest \
--chiliz \ # for Chiliz Mainnet. Use --spicy for Spicy Testnet.
--datadir=/datadir \
--ipcdisable \
--http \
--http.addr=0.0.0.0 \
--http.api=eth,net,web3,debug,txpool \
--http.port=8545 \
--http.corsdomain="*" \
--http.vhosts="*" \
--ws \
--ws.addr=0.0.0.0 \
--ws.api=eth,net,web3,debug,txpool \
--ws.port=8546 \
--ws.origins="*" \
```

{% hint style="warning" %}
**CAUTION**

For security reasons, ensure you set appropriate values for the following parameters:

`--http.corsdomain`

`--http.vhosts`

`--ws.origins`
{% endhint %}

## **Node Maintenance Information**

### Change verbosity when debugging

​In some cases, you may want to increase the verbosity of the node, i.e. when you must debug either the node or the connecting client itself.

To do that, you can define a `--verbosity` parameter. It can accept the following options (default is 3):

* 0=silent
* 1=error
* 2=warn
* 3=info
* 4=debug
* 5=detail

### Stop the node and clean up

If you have launched the node using one of the above commands then your node process continues to run in the foreground. To stop this process, press CTRL+C.

Run the following command to remove the Docker container:

```bash
docker rm ccv2-node
```

### **Delete the directory**

Run the following command to delete a directory:

```bash
rm my-datadir
```

## Updating your Node

The Chiliz Chain team strives to keep Chiliz Chain secure and modern, and we will therefore make hard fork now and then every year, such as the Dragon8 hard fork.

In the event of a hard fork, your node will be out of sync with the network. It is therefore important to follow our announcements, and update your node.

To keep your node updated, you can follow the following steps.

**If you use Docker:**

1. Ensure you stop and delete your existing Docker container while preserving the volumes that contain your database.
2. Launch your node using [the latest pre-built Docker image available](https://hub.docker.com/repository/docker/chilizchain/ccv2-geth).

**If you use your own binary:**

1. [Download the latest release from our GitHub repository](https://github.com/chiliz-chain/v2/releases).
2. Build from there with your toolset.

## Running an archive node

To run a node in archive mode, you should add the following 2 parameters into the `ccv2-geth` call presented above:

```bash
--syncmode=full \
--gcmode=archive \
```

## Running a Chiliz Chain Node from a Snapshot or Backup

To speed up the synchronization process of your Chiliz Chain node, you can rely on a snapshot: a recent copy (or archive/backup) of the blockchain data directory (`datadir`). This method allows your node to become operational more quickly compared to syncing from scratch.

{% hint style="info" %}
It recommend to keep snapshots for new node setups.\
Overwriting an existing datadir with a snapshot may lead to inconsistencies.
{% endhint %}

### Available Snapshots

Each network has a dedicated snapshot:

* Spicy Testnet: [chaindata\_snapshot.tar.gz](https://s3.eu-west-3.amazonaws.com/spicy-snapshots.chiliz.com/chaindata_snapshot.tar.gz)
* Chiliz Chain Mainnet: [chaindata\_snapshot.tar.gz](https://s3.eu-west-3.amazonaws.com/snapshots.chiliz.com/chaindata_snapshot.tar.gz)

{% hint style="info" %}
**Cleaning Existing Data**

If you intend to apply a snapshot to an existing node, ensure you delete the following directories and files within your datadir before restarting the node:

```bash
rm -rf blobpool transactions.rlp LOCK lightchaindata triecache
```

This step helps prevent potential conflicts arising from residual data.
{% endhint %}

### Steps to Run a Node from a Snapshot:

1. Create a Data Directory:

```bash
mkdir -p ~/chiliz-node/my-datadir
```

2. Download the Snapshot:

Replace the URL with the Mainnet snapshot URL if needed.

{% code overflow="wrap" lineNumbers="true" %}

```bash
cd ~/chiliz-node/my-datadir
nohup curl -L --retry 5 -o chaindata.tar.gz https://s3.eu-west-3.amazonaws.com/spicy-snapshots.chiliz.com/chaindata_snapshot.tar.gz > download.log 2>&1 &
```

{% endcode %}

{% hint style="info" %}
To monitor the download progress, use:\
`tail -f download.log`
{% endhint %}

3. Extract the Snapshot:

```bash
tar -xzf chaindata.tar.gz
```

4. Run the Chiliz Chain Node:

{% code lineNumbers="true" %}

```bash
docker run \
  -v ~/chiliz-node/my-datadir:/datadir \
  --name ccv2-node \
  -p 8545:8545 \
  -p 8546:8546 \
  chilizchain/ccv2-geth:latest \
  --spicy \  # Use --chiliz for Mainnet
  --datadir=/datadir \
  --ipcdisable \
  --http \
  --http.addr=0.0.0.0 \
  --http.api=eth,net,web3,debug,txpool \
  --http.port=8545 \
  --http.corsdomain="*" \
  --http.vhosts="*" \
  --ws \
  --ws.addr=0.0.0.0 \
  --ws.api=eth,net,web3,debug,txpool \
  --ws.port=8546 \
  --ws.origins="*"
```

{% endcode %}

## Additional Geth information

Visit Geth's [command-line options](https://geth.ethereum.org/docs/fundamentals/command-line-options) to view the full list of available Geth parameters.


# Use a hardware wallet

Connect a Ledger hardware wallet to Chiliz Chain via MetaMask for secure transaction signing on Mainnet and Spicy Testnet.

We know the idea of setting up your hardware wallet with Chiliz Chain might sound tricky, we promise it isn't.

Thanks to [MetaMask](https://metamask.io/), the process is quite straightforward. We will use a [Ledger](https://www.ledger.com/) wallet for this example, but MetaMask works for other brands as well.

*You can also have a look at the* [*official MetaMask documentation*](https://support.metamask.io/more-web3/wallets/user-guide-how-to-use-a-hardware-wallet/)*.*

## Importing your Ledger

To connect your Ledger wallet to Chiliz Chain, you need to have MetaMask installed in your browser and properly configured with your Chiliz account. [We have dedicated pages about that](/learn/about-wallets/how-to-use-metamask).

Once everything is in place, follow these steps:

1. Open the MetaMask browser extension.
2. Make sure you are on either Chiliz Chain Mainnet or Spicy Testnet.
3. Open the "Select an account" menu and click "Add account or hardware wallet", then on "Add hardware wallet".
4. A new tab opens in your browser. Select "Ledger" (or any other wallet brand you might have). More information is displayed. Select Ledger (or the brand of hardware wallet that you have), and make sure your wallet is connected to your laptop.
5. Click the "Continue" button at the bottom of the interface.\
   Your browser will then ask you if MetaMask can connect to your Ledger (or other hardware wallet).
6. Select your device.
7. Click "Connect".

MetaMask will then display the accounts stored on your wallet:

1\. Select the account from which you wish to import CHZ, by clicking its checkbox.

2\. Click "Unlock".

And *voilà*! You're all set. Your hardware wallet has now been imported into MetaMask.

## "Can I store $CHZ via Ledger through MetaMask connected to Ledger?"

Yes, you can manage your $CHZ on Chiliz Chain using MetaMask connected to Ledger.

Although the Ledger device does not display the $CHZ ticker when signing transactions, MetaMask correctly shows the $CHZ available in your Ledger account.


# Obtain Free Testnet Tokens

Get free test CHZ tokens on Spicy Testnet using the Chiliz Spicy Faucet or Tatum Faucet, with step-by-step confirmation via MetaMask and Spicy Explorer.

When developping a dApp for Chiliz Chain, you must first test it thoroughly on Spicy Testnet to ensure that it is complete and secure, before deploying it to Chiliz Chain Mainnet.

Since building a dApp requires the use of the CHZ native token in order to pay for transaction. Spicy Testnet has its own native token, which allows you to test without paying Mainnet fees.

You can obtain such test tokens for free on faucets, which are tools that distribute test crypto coins and/or tokens on the testnet. Depending on the blockchain, test tokens can be free, or at least a fraction of the Mainnet token.

There are two Spicy Testnet faucets:

* [Chiliz's Spicy Faucet](https://spicy-faucet.chiliz.com/).
* [Tatum's Chiliz Faucet for Testnet](https://tatum.io/faucets/chiliz).

Both distribute tokens for free, but with a limited number of tokens per day.

## Using a faucet to obtain test tokens

{% hint style="success" %}
Before you use any faucet, make sure to [<mark style="color:blue;">link your MetaMask Wallet to Spicy Testnet</mark>](/learn/about-wallets/how-to-use-metamask/link-chiliz-chain-and-metamask).
{% endhint %}

{% content-ref url="/pages/pSnxTrkRntJoWK3Y3ha0" %}
[Obtain test CHZ tokens with Spicy Faucet](/develop/basics/obtain-free-testnet-tokens/obtain-test-chz-tokens-with-spicy-faucet)
{% endcontent-ref %}

{% content-ref url="/pages/j6kEGLwbJyyzzkiSnbuZ" %}
[Obtain test CHZ tokens with Tatum Faucet](/develop/basics/obtain-free-testnet-tokens/obtain-test-chz-tokens-with-tatum-faucet)
{% endcontent-ref %}

## Confirming that you have received your test tokens

To confirm the reception of the test CHZ tokens:

1. Go to your MetaMask wallet.
2. Click on the 3-dot menu (which indicates Options) and select "View on Explorer".\
   ![](/files/NhXhCXipH0keGLUMl4hc)
3. This will take you to your wallet's page on Spicy Explorer, where you can see that latest transactions.


# Obtain test CHZ tokens with Spicy Faucet

Claim 20 free test CHZ tokens every 24 hours from the Chiliz Spicy Faucet by pasting your MetaMask wallet address at spicy-faucet.chiliz.com.

Chiliz's Spicy Faucet allows you to receive 20 test CHZ tokens every 24 hours.

To transfer test CHZ tokens to your wallet using Spicy Faucet, follow these steps:

1. Go to your MetaMask Wallet and copy your wallet address to the clipboard\_.\_![](/files/BM2DLOmO4UFRgWV5yhFm)
2. Go to the [Spicy Faucet webpage](https://spicy-faucet.chiliz.com/).
3. Paste your MetaMask wallet address in the text field.<br>

   <figure><img src="/files/DDTizUB1DeIHZYCh0Ikw" alt=""><figcaption></figcaption></figure>
4. If you have a bonus code, add in the dedicated field.

   <figure><img src="/files/83aFSbGQEhjHxxSKOeQ2" alt=""><figcaption></figcaption></figure>
5. Confirm that you are human.<br>

   <figure><img src="/files/FgT8NNb7Xk737yj1fEeN" alt=""><figcaption></figcaption></figure>
6. Confirm your request.

Within minutes, you should see the test CHZ tokens in your wallet.

To confirm the reception of the testCHZs:

1. go to your MetaMask wallet.
2. Select your MetaMask account. Click on the *3-dot menu* (which indicates Options). Select **View Account in Explorer**.

<figure><img src="/files/NLuPLbTz5AODmp06zzYl" alt="" width="336"><figcaption></figcaption></figure>

{% hint style="info" %}
**In case of issue**

In case your transaction doesn't go through, you can view and check for details on the [Spicy Block Explorer](https://spicy-explorer.chiliz.com/).
{% endhint %}


# Obtain test CHZ tokens with Tatum Faucet

Claim 10 free test CHZ tokens every 24 hours on Spicy Testnet from Tatum's faucet after registering a Tatum Dashboard account.

Tatum's Spicy Faucet allows you to receive 10 test CHZ tokens every 24 hours.

{% hint style="info" %}
You need to first sign up to the [**Tatum Dashboard**](https://dashboard.tatum.io/signup).
{% endhint %}

To transfer test CHZ tokens to your wallet using Tatum's Faucet, follow these steps:

1. Go to your MetaMask Wallet and copy your wallet address to the clipboard\_.\_\
   ![](/files/BM2DLOmO4UFRgWV5yhFm)
2. Connect to the [Tatum Dashboard](https://dashboard.tatum.io/).
3. Click the "Faucets" menu item (you might need to scroll down), or [access the page directly](https://dashboard.tatum.io/faucets).
4. Scroll down to "Chiliz Spicy Testnet" (or use the search bar) and click it to open the tab.<br>

   <figure><img src="/files/H2LUveU9iEPJHamrCBDn" alt=""><figcaption></figcaption></figure>
5. Paste your MetaMask wallet address in the text field.
6. Click "Claim tokens".

Within minutes, you should see the test CHZ tokens in your wallet.


# Use a Block Explorer

Navigate Chiliz Chain's two block explorers, Chiliscan (Routescan) and Chiliz Block Explorer (Blockscout), for transactions, NFTs, address lookup, and contract verification.

A block explorer is an application used by every blockchain to allow users to view transactions being carried out on that blockchain. It can give an overview of other on-chain activities. It is comparable to a digital passbook.

Block explorers are also used to verify smart-contracts after they are deployed.

One blockchain may have more than one block explorer.

## Chiliz Chain Mainnet block explorers

Chiliz Chain has two block explorers for its Chiliz Mainnet, which you can use to see recent transactions.

You can also use them to view your own transactions and statuses, display your collected NFTs, look up other addresses, view transaction history, and verify your smart-contracts.

### **Chiliscan By Routescan**

{% embed url="<https://chiliscan.com>" %}

<figure><img src="/files/fBtHcUix7KBE7W4hszyC" alt=""><figcaption></figcaption></figure>

### **Chiliz Chain Explorer by Blockscout**

{% embed url="<https://scan.chiliz.com/>" %}

<figure><img src="/files/6GlzhWWW4XBbVKCTRZ4z" alt=""><figcaption></figcaption></figure>

## Spicy Testnet block explorers

Chiliz Chain has two block explorers for its Spicy Testnet, which you can use to see recent transactions.

You can also use them to view your own transactions and statuses, display your collected NFTs from the Testnet, look up other addresses, view transaction history, and verify your smart-contracts.

### **Chiliscan By Routescan**

{% embed url="<https://testnet.chiliscan.com>" %}

<figure><img src="/files/tBtTWO0gaAEKwdp2dBuq" alt=""><figcaption></figcaption></figure>

### **Chiliz Chain Explorer by Blockscout**

{% embed url="<https://spicy-explorer.chiliz.com>" %}

<figure><img src="/files/uuSK9n4C1yCpql1RUZuE" alt=""><figcaption></figcaption></figure>


# Write a Smart Contract

Write Chiliz Chain-compatible Solidity contracts: recommended Solidity and EVM versions, CAP-20 token decimals, gas mechanics, and EVM differences vs. Ethereum.

From the moment you decide to create a dApp on Chiliz Chain, you need to take the specifics of our blockchain into account.

While Chiliz Chain is EVM-compatible, treating it exactly like Ethereum can lead to usability issues, specifically regarding token decimals and gas mechanics.

Let's explore!

## Prerequisites

### Environment

Before you start writing your contract, make sure that your environment is ready.

First, you must have a wallet configured for Spicy Testnet (for development) or Chiliz Chain Mainnet (for production).

{% content-ref url="/pages/0UYb0mh54mqwYz8XblJv" %}
[Connect to Chiliz Chain](/develop/basics/connect-to-chiliz-chain)
{% endcontent-ref %}

Second, you will need $CHZ to pay for gas deployment on both Testnet and Mainnet. While you can buy Mainnet $CHZ on any crypto exchange, you can rely on faucets for Testnet tokens.

{% content-ref url="/pages/Af9548Yd4RQMNgtsUkq9" %}
[Obtain Free Testnet Tokens](/develop/basics/obtain-free-testnet-tokens)
{% endcontent-ref %}

In terms of tooling, you can rely on Hardhat or Remix. See for instance:

{% content-ref url="/pages/cwZqLlr1ee8FwupJJUCc" %}
[Deploy with Remix](/develop/basics/deploy-a-smart-contract/deploy-with-remix)
{% endcontent-ref %}

Finally, Chiliz Chain contracts are written in the Solidity language:

{% embed url="<https://www.soliditylang.org/>" %}

{% embed url="<https://solidity-by-example.org/>" %}

Use the recommended Solidity and EVM versions:

{% hint style="info" %}
**Recommended Solidity and EVM versions for Chiliz Chain:**

* **Solidity compiler version:** `0.8.30` (or lower)
* **Target EVM version:** `prague`
  {% endhint %}

### Fan Tokens / CAP-20

The most specific aspect of Chiliz Chain is the CAP-20 standard, used for Fan Tokens.

While technically identical to the ERC-20 standard code-wise, CAP-20 tokens have a specific configuration for decimals. In short: It uses 0 decimals, while regular ERC-20 token use 18 decimals.

{% content-ref url="/pages/DUqAvWtmu3FJYbH3fPN4" %}
[About Fan Tokens](/learn/about-fan-tokens)
{% endcontent-ref %}

Therefore, if you deploy a Fan Token with 18 decimals, it may not display correctly in ecosystem wallets or be compatible with future Socios.com integrations.

## Best practices in writing a smart contract

### Use Battle-Tested Libraries (OpenZeppelin)

Do not start from creating your contract from scratch.\
The single most effective security practice is to base your code on community-audited standards, to reduce the risk of vulnerabilities

For Chiliz Chain development, we strongly recommend using [OpenZeppelin Contracts](https://docs.openzeppelin.com/contracts). They provide secure and community-vetted implementations for tokens contracts.

By using standard contracts, your ensure that your tokens are compatible with known wallets (like MetaMask) and the Chiliz ecosystem (Socios.com).

### General EVM Best Practices

Regardless of the chain, these three patterns are non-negotiable for secure Solidity development.

#### The "Checks-Effects-Interactions" Pattern

This is your primary defense against [Reentrancy Attacks](https://solidity-by-example.org/hacks/re-entrancy/). Always structure your functions in this exact order:

1. Checks: Validate inputs and conditions (e.g., `require` statements).
2. Effects: Update the contract state (e.g., reduce balances).
3. Interactions: Interact with other contracts or send funds (e.g., `transfer`).

#### Robust Access Control

Never leave sensitive functions unprotected. If a function mints tokens, changes fees, or upgrades logic, it must be restricted.

* Simple: Use `Ownable` for single-admin contracts.
* Complex: Use `AccessControl` for contracts requiring multiple roles (e.g., `MINTER_ROLE`, `ADMIN_ROLE`).

#### Input Validation

Assume all input is malicious. Use `require()` statements at the very beginning of your functions to validate parameters.

For instance:

* Check for zero addresses (`address(0)`).
* Check for zero amounts when transferring.
* Verify array lengths match if passing multiple arrays.
* etc.

### Chiliz-Specific Implementation Details

While Chiliz Chain is EVM-compatible, certain "local rules" apply, specifically regarding token decimals.

#### CAP-20 Compliance (Fan Tokens)

If you are writing a contract that interacts with Fan Tokens (e.g., a Staking Pool for $PSG or $BAR), you must handle 0 decimals.

This means:

* Do not assume `1 Token = 10^18 units`. For Fan Tokens, `1 Token = 1 unit`.
* Avoid hardcoding `1e18` in your math if your contract is meant to be generic. Use the `token.decimals()` function dynamically.

### Gas Optimization on Chiliz

Transactions on Chiliz Chain are significantly cheaper than Ethereum, but unoptimized code can still lead to congestion or failed transactions during high-traffic events (e.g., during a live match).

Here are three ways to save on gas:

* Use Custom Errors: Instead of long string messages in `require`, use `error` definitions to save gas.
* Order your state variables to fit into 32-byte slots. Put `uint128`, `address`, and `bool` next to each other where possible.
* Prefer `external` for functions that are never called internally by the contract itself.


# Deploy a Smart Contract

Deploy smart contracts on Chiliz Chain using Remix IDE or thirdweb, with minimum gas fee requirements (2,501 gwei) and links to verification guides.

Building a smart contract is an essential part of the creative project that leads to a dApp for Chiliz Chain (or any blockchain, really).

There are two steps that you **must** go through once you have built your dApp's smart contract:

1. Deploying the contract on Chiliz Chain.
2. Verifying that contract.

This section focuses on smart contract deployment.

{% hint style="success" %}
To ensure that your deployment transaction doesn't remain in "pending" status for too long, you should include enough to cover the fees:

* Minimum gas fee: 2,501 gwei.
* Minimum priority fee: 1 gwei.
  {% endhint %}

To deploy your smart contract on Chiliz Chain, we recommand either of these options:

{% content-ref url="/pages/cwZqLlr1ee8FwupJJUCc" %}
[Deploy with Remix](/develop/basics/deploy-a-smart-contract/deploy-with-remix)
{% endcontent-ref %}

{% content-ref url="/pages/RFojVMHPNEiBunOWwzIL" %}
[Deploy with thirdweb](/develop/basics/deploy-a-smart-contract/deploy-with-thirdweb)
{% endcontent-ref %}

{% hint style="success" %}
After creating a smart contract, it is **necessary** to verify it.\
Only **you** can do it, and you should do it as soon as the contract is deployed.
{% endhint %}

{% content-ref url="/pages/Lxl4NxqCWg16RmKF2Iln" %}
[Verify a Smart Contract](/develop/basics/verify-a-smart-contract)
{% endcontent-ref %}


# Deploy with Remix

Deploy a smart contract to Chiliz Chain using Remix IDE's web-based environment, with steps for compiling, injecting MetaMask, and confirming deployment.

[Remix](https://remix.live/) is a no-setup toolset for developing smart contracts. Used by experts and beginners alike, Remix will get you going in no time.

Remix is available as [a web-based environment](https://remix.ethereum.org/), [a desktop program](https://github.com/remix-project-org/remix-desktop), and even [a CLI tool](https://www.npmjs.com/package/@remix-project/remixd).\
In this page, we will use the web-based version.

{% hint style="info" %}
You can also use the [official Remix IDE documentation for creating and deploying a contract](https://remix-ide.readthedocs.io/en/latest/create_deploy.html).
{% endhint %}

Here is how to deploy a smart contract using Remix Online IDE:

1. Go to [<mark style="color:blue;">https://remix.ethereum.org</mark>](https://remix.ethereum.org). The Remix IDE opens in your browser.<br>

   <figure><img src="/files/viITIYvrs1e3XgHkgvN5" alt=""><figcaption></figcaption></figure>
2. Click the "Create a new Workspace" button, then choose an option: blank workspace, AI-generated workspace, contract wizard, project import, or git repository cloning. You also rely on categorized workspace templates.\
   For the purpose of this tutorial, we'll use an OpenZeppelin ERC20 workspace template. You can of course deploy your own smart contract using a blank workspace.

{% hint style="info" %}
Chiliz's Fan Tokens are CAP-20 tokens, which are Chiliz Chain-specific extension of the Ethereum ERC20 token standard. [Learn more about CAP-20 here](/learn/glossary/cap-20).
{% endhint %}

3. Scroll down to the "OpenZeppelin" template category, and click the "ERC20" template.

<figure><img src="/files/Y2RIomTy0B02cQa0Co32" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
[OpenZeppelin](https://www.openzeppelin.com/) is an open-source platform for building secure dApps.

In addition to several security and auditing services, they provide [a library of community-vetted smart contracts](https://docs.openzeppelin.com/contracts/), free for the community to use in their projects.

OpenZeppelin contracts are considered industry standards, and you can safely use them.
{% endhint %}

4. Give your ERC20 token a name using the form that Remix displays, then click the "Validate workspace" button.

<figure><img src="/files/mqFAz3U9PAdUMePBkHzS" alt=""><figcaption></figcaption></figure>

Once you validate your choice, Remix loads a standard workspace with folders and files that appear in the File Explorer on the left. Click in the `/contracts/{token name}.sol` file to display the ERC20 contract that you are about to deploy:

<figure><img src="/files/W5I5oqwuccJIxFocUVSq" alt=""><figcaption></figcaption></figure>

As you can see, the default `MyToken.sol` smart contract imports the `ERC20.sol` contract from OpenZeppelin.\
\&#xNAN;*You can open the `.deps/npm/@openzeppelin/contracts/token/ERC20/ERC20.sol` file to display the ERC20 contract itself.*

You are free to edit your `MyToken.sol` contract as you see fit.\
For instance, in order to work with the Chiliz Chain EVM, your contract should rely on Solidity 0.8.30 at most, so make this change:

```solidity
pragma solidity ^0.8.30;
```

... and select the relevant compiler:

<div align="left"><figure><img src="/files/dkVnGZIoWPdjp54akbY5" alt="" width="277"><figcaption></figcaption></figure></div>

5. Click the "Compile\*\*"\*\* above your contract file.\
   ![](/files/YgByyj4ffoahlr0QTj4W)

If there are no mistakes in your changes, Remix IDE should display a green checkmark in the "Solidity Compiler" menu on the left:

<div align="left"><figure><img src="/files/9YjqsjRN1aVIaOAmISbC" alt="" width="338"><figcaption></figcaption></figure></div>

6. Open the "Deploy & run transactions" section.<br>

   <figure><img src="/files/FYWAtVdXpOrTHbpsU9Lu" alt=""><figcaption></figcaption></figure>

* Select "Browser Extension > Injected Provider - MetaMask" in the "Environment" dropdown menu. This will link the deployed token to your MetaMask account, which should be configured to work with Chiliz Chain already (if not, [see here](/learn/about-wallets/how-to-use-metamask/link-chiliz-chain-and-metamask)).
* Make sure that Remix displays the correct network: Chiliz Chain Mainnet.\
  ![](/files/ebL3ycIdCQNAyQkzTBpP)
* Make sure that your contract file is selected and that the chosen EVM version is "Prague".\
  If not, it means your compiler version was not set to v0.8.30 (see above), go back to Step 4.\
  ![](/files/ZvADx31oqJdHa1O3loTB)
* Click "Deploy & Verify".\
  \&#xNAN;*If you prefer to just deploy the contract then verify the contract by yourself, you can have Remix deploy the contract by unchecking the "Verify Contract on Explorers" box.*

{% hint style="warning" %}
Make sure to have enough CHZ on your wallet to pay for the deployment transactions!
{% endhint %}

7. Your MetaMask wallet should open automatically.

<figure><img src="/files/8kVSmi1WThG6oWoOlrZg" alt="" width="375"><figcaption></figcaption></figure>

8\. Click "Confirm" to link your MetaMask Wallet with your token's smart contract.\
You should receive a notification confirming the transaction within a few seconds, along with an invitation to view the transaction on the [Chiliscan](https://chiliscan.com/) block explorer.

From the transaction, you can can access the deployed contract itself (here, the link after "Contract"):

<figure><img src="/files/f8uyv4C4w90dMeZvuMpd" alt=""><figcaption></figcaption></figure>

In your MetaMask wallet, under the \_"\_Activity" tab, you will see the contract deployment information. Click it to see all the information about it:

<figure><img src="/files/e9tEMicTGHKCpWf1O1Ew" alt="" width="329"><figcaption></figcaption></figure>

Congratulations! Your contract is now deployed on Chiliz Chain!

Now it is time to verify it:

{% content-ref url="/pages/Lxl4NxqCWg16RmKF2Iln" %}
[Verify a Smart Contract](/develop/basics/verify-a-smart-contract)
{% endcontent-ref %}


# Deploy with thirdweb

Deploy standard or custom smart contracts on Chiliz Chain Mainnet or Spicy Testnet using thirdweb's Explore library or CLI deployment tool.

[Thirdweb](https://thirdweb.com/) provides tools, SDKs, and smart contract templates that simplify building and deploying blockchain apps.

Thirdweb provides their services for most EVM-based chains, including [Chiliz Chain Mainnet](https://thirdweb.com/chiliz-chain) as well as [Spicy Testnet](https://thirdweb.com/spicy-chain).

There are two ways of deploying a contract to Chiliz Chain using thirdweb's tools:

* Use their web-based Explore library, if you just want a standard contract.
* Use their CLI-centric tool, if you want to deploy a custom contract.

We'll explore both here.

*Note: The thirdweb team built a great video about this very topic:*

{% embed url="<https://www.youtube.com/watch?v=_fghhiFg870>" %}

## Deploy a smart contract using thirdweb's Explore <a href="#deploy-a-smart-contract-using-remix-ide" id="deploy-a-smart-contract-using-remix-ide"></a>

Thirdweb provides [Explore](https://thirdweb.com/explore), a library of audited EVM smart contracts, along with an online tool that allows anyone to deploy a standard contract to any EVM chain.

{% hint style="info" %}
You can also rely on [the official thirdweb documentation for their Explore library](https://portal.thirdweb.com/tokens/explore/overview).
{% endhint %}

1. Go to [thirdweb Explore](https://thirdweb.com/explore).
2. Click the "Token" contract.

<figure><img src="/files/0PsnTQ1Lb9u4N3t65yP5" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
Chiliz's Fan Tokens are CAP-20 tokens, which are a Chiliz Chain-specific extension of the Ethereum ERC20 token standard. [Learn more about CAP-20 here](/learn/glossary/cap-20).
{% endhint %}

The contract page opens. We advise you to fully read the information it displays.

3. Click the "Deploy Now" button (top right of the screen).

A form opens:

<figure><img src="/files/QiUghqvewViapdUTP6Me" alt=""><figcaption></figcaption></figure>

4. Fill in the various form fields, starting with the "Contract Metadata" section.

The rest of the sections can be left to be auto-filled by Explore, but we advise you to pay attention to each, most importantly:

* Recipient address: If you are logged with your wallet (such as MetaMask), this field should already display your wallet's address. Make sure it is indeed yours!
* Deploy options: This is where you choose the chain where you want to deploy this contract. Make sure to choose Chiliz Chain (or Spicy Testnet, depending on your need)!

5. Click on "Deploy Now" to deploy your own Token on Chiliz Chain.

{% hint style="warning" %}
Make sure to have enough CHZ on your wallet to pay for transactions!
{% endhint %}

<figure><img src="/files/6DA5x8hrOU5axIZGzIYn" alt="" width="375"><figcaption></figcaption></figure>

You will have transactions to sign from your wallet, the number of which can vary.

6. Click on "View Now" to access your thirdweb dashboard and see the deployed contract.

## Deploy a smart contract using thirdweb's CLI tool <a href="#deploy-a-smart-contract-using-remix-ide" id="deploy-a-smart-contract-using-remix-ide"></a>

thirdweb's `deploy` tool simplifies smart contract deployment to any EVM chain (including Chiliz Chain) with a single command, handling complex technical details automatically.

This is the recommended way if you want to use a non-standard contract (for instance, [a customized OpenZeppelin contract](https://www.openzeppelin.com/solidity-contracts)).

{% hint style="info" %}
You can also rely on [the official thirdweb documentation for their deployment tools](https://portal.thirdweb.com/contracts/deploy/overview).
{% endhint %}

### Installing thirdweb CLI

To use the thirdweb deploy tool, you need:

* a local installation of Node.js and its npm tool.
* a local installation of the thirdweb CLI tool.

To install Node.js and npm, [follow the instructions here](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).

Then you can install thirdweb CLI by running the following command in the terminal:

```bash
npm i -g @thirdweb-dev/cli
```

The thirdweb team has created a [deep-dive video for thirdweb CLI](https://www.youtube.com/watch?v=8ttGHEQ-Ddo), which you should definitly check out!

### Deploying a contract using thirdweb CLI

Once you have installed the CLI, you can use it to deploy your smart contracts.

1. From the terminal, navigate to the root of your smart contract repository.
2. Run the deploy command:

```bash
npx thirdweb deploy
```

This will then guide you through the process of deploying your contract:

1. It will connect to your thirdweb dashboard by opening a browser window.
2. From the dashboard, you will need to authorize your device. This will require you to sign a transaction using the wallet that you use with thirdweb.

Check out the demo from the thirdweb team:

{% embed url="<https://www.youtube.com/watch?v=6EqumMCa-E8>" %}


# Verify a Smart Contract

Verify deployed Chiliz Chain contracts via Chiliscan (Routescan) or Chiliz Block Explorer (Blockscout), with Hardhat CLI and flattening options.

{% hint style="success" %}
After creating a smart contract, it is **necessary** to verify it.\
Only **you** can do it, and you should do it as soon as the contract is deployed.
{% endhint %}

Verifying a smart contract allows you to confirm that the contract's source code corresponds to a specific contract address on the blockchain. This is crucial for transparency and trust, especially in the decentralized world of blockchain.

Once you have deployed your smart contract on Chiliz Chain, you can verify it by using a block explorer, such as [Chiliscan](https://chiliscan.com/) (by [Routescan](https://routescan.io/)) or [Chiliz Block Explorer](https://scan.chiliz.com/) (by [Blockscout](https://www.blockscout.com/)).

{% content-ref url="/pages/QmhlZEvcZGdhu1QvIR0p" %}
[Verify with Chiliscan](/develop/basics/verify-a-smart-contract/verify-with-chiliscan)
{% endcontent-ref %}

{% content-ref url="/pages/uYTtcHioYwh7WkNtwSzW" %}
[Verify with Chiliz Block Explorer](/develop/basics/verify-a-smart-contract/verify-with-chiliz-block-explorer)
{% endcontent-ref %}

You can also verify your contract through the command line:

{% content-ref url="/pages/Utz4llTOvh55F6bXKBcP" %}
[Verify with Hardhat](/develop/basics/verify-a-smart-contract/verify-with-hardhat)
{% endcontent-ref %}

Note that it might be easier for you to validate your deployed smart contract using a flattened version of it. Here is how:

{% content-ref url="/pages/ECjnpYfhcIQjbbGFIK6a" %}
[Flatten a Smart Contract](/develop/basics/verify-a-smart-contract/flatten-a-smart-contract)
{% endcontent-ref %}

In any case, always follow the best practices!

{% content-ref url="/pages/45qDeGBAYOmk49ac0xbH" %}
[Verification Best Practices](/develop/basics/verify-a-smart-contract/verification-best-practices)
{% endcontent-ref %}


# Verify with Chiliscan

Verify smart contracts on Chiliz Chain via Chiliscan (Routescan) using the web form, Hardhat plugin, or Routescan API.

[Chiliscan](https://chiliscan.com/) is a service built by Routescan. You can therefore rely on [their documentation](https://routescan.io/documentation) for your everyday use.

Routescan provides several ways to verify your smart contract on Chiliz Chain:

* For most contracts: using their verification form on Chiliscan
* For more complex contracts: using command-line tools, such as Hardhat.
* For easy contracts: using their API.

See Routescan's [documentation on contract verification](https://info.routescan.io/en/collections/14599808-contract-verification).

## Using Chiliscan's verification form

Chiliscan provides a contract verification interface for Chiliz Mainnet at <https://chiliscan.com/verifycontract>.\
It is also documented here: <https://info.routescan.io/en/articles/11991234-verifying-contracts-ui>

{% hint style="info" %}
You can also verify contract on Spicy Testnet with this interface:\
<https://testnet.chiliscan.com/verifycontract>
{% endhint %}

{% hint style="info" %}
For multi-file contracts, ensure your code has been flattened before uploading.

For instance, if you use Remix IDE, you can right click on your compiled `contract-XYZ.sol` contract file in the File Explorer, and choose the "Flatten" option.\
Then, download the resulting file (named `contract-XYZ_flattened.sol` in order to upload it to the verification form.
{% endhint %}

Steps:

1. In the "Contract address" field, insert the address of the smart contract that you want to verify.\
   \&#xNAN;*Depending on the situation, the tool can tell you that a contract doesn't exist yet on Chiliz Chain, or that it has already been verified. If it's neither, further interface elements are displayed.*<br>

   <figure><img src="/files/8zkqfckHGwWndRWZebDL" alt="" width="375"><figcaption></figcaption></figure>
2. Click on "Import from Solidity", and fill the form correctly:
   1. Select "0.8.30+xxx" as the compiler version.
   2. Select "Prague" as the EVM version.
   3. Upload your contract file.
3. Click on "Verify Contract".

If successful, your contract will be clearly labeled as verified, notably with a green check. The block explorer will make its source code visible and enable all interactive features.

<figure><img src="/files/DZWpwSSvO88Tm10ZJzTc" alt=""><figcaption></figcaption></figure>

For instance, here is the verified $PSG Fan Token contract on Chiliscan:

{% embed url="<https://chiliscan.com/token/0xfe1d4a935df7a4a52f835f6104c97af9d72217f2/contract/code>" %}

If any errors occur, the interface will display a corresponding error message to guide you.

## Using command-line tools

Routescan's own documentation features [detailed guides](https://info.routescan.io/en/collections/14599808-contract-verification) on how to use command-line tools for verification. This is particularly useful if you're already want to automate contract verification in your development environment.

You can read their guides on deploying & verifying with:

* [Hardhat v2](https://info.routescan.io/en/articles/11991333-deploying-and-verifying-contracts-hardhat)
* [Hardhat v3](https://info.routescan.io/en/articles/12867834-deploying-and-verifying-contracts-hardhat-v3)
* [Foundry](https://info.routescan.io/en/articles/11992459-deploying-and-verifying-contracts-foundry)

## Using Routescan's API

Routescan has a dedicated contract API, which you can use to verify contracts:

{% embed url="<https://routescan.io/documentation/api/etherscan-like/contracts>" %}

If you are working with simpler smart contracts, a Routescan-provided guide is available on Paragraph.com. This guide walks you through the steps to prepare and verify contracts that do not require complex build processes.

* Access [A Guide to Easily Verify Your Smart Contract Programmatically Using Routescan's API](https://paragraph.com/@routescan-io/a-guide-to-easily-verify-your-smart-contract-programmatically-using-routescan-s-api).

Of note: it requires contracts to be flattened.


# Verify with Chiliz Block Explorer

Verify smart contracts on Chiliz Chain via Chiliz Block Explorer (Blockscout) using the web form, Hardhat plugin, or Blockscout API.

[Chiliz Block Explorer](https://scan.chiliz.com/) is a service built by Blockscout. You can therefore rely on [their documentation](https://docs.blockscout.com/) for your everyday use.

Blockscout provides several ways to verify your smart contract on Chiliz Chain:

* For most contracts: using their verification feature.
* For more complex contracts: using command-line tools, such as Hardhat.
* For easy contracts: using their API.

See Blockscout's [documentation on contract verification](https://docs.blockscout.com/devs/verification).

## Using the Chiliz Block Explorer verification feature

Chiliz Block Explorer provides a contract verification interface for Chiliz Mainnet at\
<https://scan.chiliz.com/contract-verification>.\
It is also documented here: <https://docs.blockscout.com/devs/verification/blockscout-ui>

{% hint style="info" %}
You can also verify contract on Spicy Testnet with this interface:\
<https://spicy-explorer.chiliz.com/>
{% endhint %}

{% hint style="info" %}
For multi-file contracts, ensure your code has been flattened before uploading.

For instance, if you use Remix IDE, you can right click on your compiled `contract-XYZ.sol` contract file in the File Explorer, and choose the "Flatten" option.\
Then, download the resulting file (named `contract-XYZ_flattened.sol` in order to upload it to the verification form.
{% endhint %}

Steps:

1. In the "Contract address to verify" field, insert the address of the smart contract.
2. Select the license that you want to apply to your contract. Because it is not obvious what this means, [here is a quick explainer](https://choosealicense.com/) on open-source licenses.

<figure><img src="/files/lWGQGyxqBcrsHm86Z1mq" alt=""><figcaption></figcaption></figure>

3. Choose the verification method.\
   The most simple method will be to provide a flattened version of your Solidity contract, or "Solidity (Single file)".
4. Choose the compiler version (Chiliz Chain supports versions up to v0.8.30) and EVM version (Chiliz Chain supports versions up to the Prague version).

<figure><img src="/files/jNtewFdS9lae3K1lYzpc" alt=""><figcaption></figcaption></figure>

5. Finally, in "Contract Code" field, paste the smart contract code that you used to originally compile the smart contract, and click "Verify & publish".

<figure><img src="/files/JBYPbXVV8fBCleQ6UKZl" alt=""><figcaption></figcaption></figure>

If successful, your contract will be clearly labeled as verified, notably with a green check. The block explorer will make its source code visible and enable all interactive features.

<figure><img src="/files/1qFpuRnuEXJIwhdvxf9K" alt="" width="563"><figcaption></figcaption></figure>

For instance, the $PSG Fan Token is deployed as a proxy contract, whose verified implementation contract is shown on Chiliz Block Explorer here (note the green check):

{% embed url="<https://scan.chiliz.com/address/0xeC991a3FA1bfB4835A1D22f3df05c2CED5B7bF6d?tab=contract>" %}

## Using command-line tools

Blockscout's own documentation features [detailed guides](https://docs.blockscout.com/devs/verification) on how to use command-line tools for verification. This is particularly useful if you're already want to automate contract verification in your development environment.

You can read their guides on deploying & verifying with:

* [Hardhat](https://docs.blockscout.com/devs/verification/hardhat-verification-plugin)
* [Foundry](https://docs.blockscout.com/devs/verification/foundry-verification)
* [Sourcify](https://docs.blockscout.com/devs/verification/contracts-verification-via-sourcify)
* [Remix](https://docs.blockscout.com/devs/verification/remix-verification)
* ... and more!

## Using Blockscout's API

Blockscout has a dedicated contract verification API:

{% embed url="<https://docs.blockscout.com/devs/verification/blockscout-smart-contract-verification-api>" %}

The API endpoints are:

* Chiliz Mainnet: <https://scan-api.chiliz.com/api/v2/>
* Spicy Testnet: <https://spicy-explorer-api.chiliz.com/api/v2/>


# Verify with Hardhat

Verify Chiliz Chain smart contracts from the command line using the hardhat-verify plugin with Chiliscan or Chiliz Block Explorer API keys.

Since Chiliz Chain is an EVM-compatible chain, you can verify your contract using the standard [hardhat-verify](https://hardhat.org/docs/guides/smart-contract-verification) plugin, relying on a block explorer API to bridge your development environment with the blockchain itself.

Both Chiliscan and Chiliz Block Explorer provide a documentation on Hardhat verification:

{% embed url="<https://info.routescan.io/en/articles/11991333-deploying-and-verifying-contracts-hardhat>" %}

{% embed url="<https://docs.blockscout.com/devs/verification/hardhat-verification-plugin>" %}

Hardhat's own documentation has a full page on contract verification:

{% embed url="<https://hardhat.org/docs/tutorial/verifying>" %}


# Flatten a Smart Contract

Flatten a Solidity smart contract and all its dependencies into a single .sol file using Remix or Hardhat to simplify source code verification on Chiliz Chain explorers.

Flattening a smart contract is the process of combining the main contract with all its dependencies (interfaces, libraries, inherited contracts) into a single, standalone `.sol` file. This makes it much easier to validate the deployed contract.

{% hint style="info" %}
You do not need to flatten your contract to deploy it.

Flattening is primarily a post-deployment step used to verify your source code on an explorer.
{% endhint %}

Because Chiliz Chain is an EVM-compatible blockchain, there are several tools available to flatten a contract.

{% hint style="info" %}
If you deploy from your original files, then flatten them to verify the whole contract, you must ensure that nothing changes in the compilation settings.

Otherwise, you risk to get a "Bytecode mismatch" sort of error, and verification will fail.
{% endhint %}

## Flatten using Remix IDE

In the File Explorer, right-click your main contract, and choose "Flatten" in the menu.

<figure><img src="/files/8bIOqYPJyDMgunB3bAVv" alt="" width="375"><figcaption></figcaption></figure>

Remix will generate a `CONTRACT_flattened.sol` contract in your folder.

## Flatten using Hardhat

Adapt the following line to your workflow:

```bash
npx hardhat flatten contracts/MyContract.sol > Flattened.sol
```

{% hint style="warning" %}
Because a flattened contract can be thousands of lines long, they are terrible for actual development and maintenance.

They should only be generated when you need them, for instance when verifying the deployed contract.
{% endhint %}


# Verification Best Practices

Best practices for verifying Chiliz Chain contracts: CAP-20 token specifics, recommended Solidity and EVM version settings, and common pitfalls from Ethereum-first code.

Verifying smart contracts on Chiliz Chain requires a combination of standard EVM practices, and and attention to chain-specific details.

Indeed, because Chiliz Chain operates on a Proof of Staked Authority (PoSA) consensus mechanism with specific standards like CAP-20 and a specific EVM versioning, simply porting code from Ethereum might not work.

## Understand the CAP-20 standard

While Chiliz Chain is EVM-compatible, the ecosystem relies on the CAP-20 standard for tokens. This is the Chiliz specific implementation of ERC-20.

See the token details here:

{% content-ref url="/pages/cqMxDMExW3MWm8QdRgCY" %}
[CAP-20](/learn/glossary/cap-20)
{% endcontent-ref %}

If you are developing a Fan Token or an asset intended to behave like one, you should explicitly set decimals to 0. Standard DeFi tokens may use 18.

## Configure compiler & EVM

Chiliz Chain validators are optimized for specific EVM versions. Using "bleeding edge" configurations may lead to deployment failures or unexpected behavior.

You should rely on these versions:

{% hint style="info" %}
**Recommended Solidity and EVM versions for Chiliz Chain:**

* **Solidity compiler version:** `0.8.30` (or lower)
* **Target EVM version:** `prague`
  {% endhint %}

## Optimize for gas

Chiliz Chain enforces a "high-Gwei" minimum gas price to prevent spam and ensure validator sustainability.

Since the Dragon8 hard fork, Chiliz Chain implements EIP-1559 but with a **minimum base fee of 2500 gwei**. This means unoptimized code is significantly more expensive for your users here than on other chains.

You should therefore optimize your contract for storage usage (the most expensive operation):

* Pack `uint128`, `uint64`, or `bool` variables next to each other so they fit into a single 32-byte storage slot.
* Use `calldata` instead of `memory` for read-only function arguments (external functions) to save gas during execution.

{% hint style="success" %}
Install `hardhat-gas-reporter` and configure it with the specific Chiliz gas price settings to see the real-world cost in CHZ before you deploy.
{% endhint %}

## Always test on Spicy

Never assume Mainnet equivalence based on your Ethereum experience. You must validate interactions with the Chiliz PoSA consensus on the Spicy Testnet before you move to Chiliz Chain Mainnet.

See the connection details here:

{% content-ref url="/pages/0UYb0mh54mqwYz8XblJv" %}
[Connect to Chiliz Chain](/develop/basics/connect-to-chiliz-chain)
{% endcontent-ref %}


# Use Wrapped CHZ

Wrap and unwrap native CHZ to wCHZ (ERC-20/CAP-20) on Chiliz Chain Mainnet and Spicy Testnet using the Chiliz Bridge wrapper for DeFi and bridging use cases.

## What Is Wrapped Chiliz (wCHZ)? <a href="#header-0" id="header-0"></a>

Learn about it in the Glossary:

{% content-ref url="/pages/19X6fcpaENPWybUKj2qb" %}
[Wrapped CHZ (wCHZ)](/learn/glossary/wrapped-chz-wchz)
{% endcontent-ref %}

## How do I get wrapped Chiliz (wCHZ)?

### On Mainnet

To get wrapped CHZ on Chiliz Mainnet, you can use our wrapper on the Chiliz Bridge dApp:

{% embed url="<https://bridge.chiliz.com/wrap>" %}

**Step 1:** Click "Wrap CHZ" in the top menu

<figure><img src="/files/lIb7EWWOQk1quBuBKlui" alt=""><figcaption></figcaption></figure>

**Step 2:** Connect your Metamask wallet.

**Step 3:** Select what you want to convert:

* select CHZ if you want to wrap.
* select wCHZ if you want to unwrap.

**Step 4:** Choose how many tokens you want to wrap/unwrap.

**Step 5:** Click "Wrap/Unwrap CHZ".

**Step 6:** Follow the steps in Metamask.

### Wrapped Chiliz contract address on Chiliz Mainnet

The official Chiliz Chain Wrapped Chiliz address is here:

{% embed url="<https://scan.chiliz.com/address/0x677F7e16C7Dd57be1D4C8aD1244883214953DC47>" %}

The contract itself is at this address: `0x677F7e16C7Dd57be1D4C8aD1244883214953DC47`

### On Spicy Testnet

Wrapped Chiliz are also available on Spicy, the Chiliz Testnet.

To get wrapped CHZ on the Spicy Testnet, you can use our wrapper on the Chiliz Bridge dApp:

{% embed url="<https://spicy-bridge.chiliz.com/wrap>" %}

It is the same process as the Mainnet one.

### Wrapped Chiliz contract address on Spicy Testnet

The official Chiliz Chain Wrapped Chiliz address is here:

{% embed url="<https://spicy-explorer.chiliz.com/address/0x678c34581db0a7808d0aC669d7025f1408C9a3C6>" %}

The contract itself is at this address: `0x678c34581db0a7808d0aC669d7025f1408C9a3C6`


# How-Tos

Practical how-tos using Moralis, Tatum, thirdweb, and Nodit APIs on Chiliz Chain: wallet balances, transaction history, NFT metadata, and AI-assisted dApp building.

Chiliz Chain is fully compatible with Ethereum-centric frameworks and third-party tools.

This compatibility allows developers to use familiar Ethereum development processes and integrate advanced functionalities.

In this section, we give you some simple examples using EVM tools that integrate Chiliz Chain:

* [Moralis](https://moralis.com/): As an extensive framework for Web3 developers, Moralis provides several EVM-centric APIs, allowing you to deliver projects more quickly.\
  Read [Moralis' Chiliz-specific documentation](https://docs.moralis.com/web3-data-api/evm/chains/chiliz).
* [Tatum](https://tatum.io/): As a unified framework for building Web3 apps, Tatum provides several EVM-centric APIs, allowing you to deliver projects more quickly.\
  Read [Tatum's Chiliz-specific documentation](https://docs.tatum.io/reference/rpc-chiliz).
* [thirdweb](https://thirdweb.com/): thirdweb is a platform offering tools and infrastructure for building decentralized applications on multiple blockchain networks. It simplifies blockchain integration with SDKs, APIs, and pre-built components. Read [thirdweb's Chiliz page](https://thirdweb.com/chiliz-chain).
* [Nodit](https://nodit.io/): Nodit provides tools that make it easy to develop in a variety of multi-chain environments and reliable node services.\
  Read [Nodit's Chiliz-specific API reference](https://developer.nodit.io/en/api/chiliz/web3-data-api/getblockbyhashornumber/).

{% content-ref url="/pages/kVBVGzzFzE9a9XaoN4EU" %}
[How to get the balance of a wallet](/develop/basics/how-tos/how-to-get-the-balance-of-a-wallet)
{% endcontent-ref %}

{% content-ref url="/pages/OTBYMVSIMMrAMWQJcnap" %}
[How to get the history of a wallet](/develop/basics/how-tos/how-to-get-the-history-of-a-wallet)
{% endcontent-ref %}

{% content-ref url="/pages/ZUCl1jCin6lhJPA2pX6W" %}
[How to get the metadata of a specific NFT](/develop/basics/how-tos/how-to-get-the-metadata-of-a-specific-nft)
{% endcontent-ref %}

We encourage you to explore all these platforms further, and see which one fits your development practices and preferences.

Besides blockchain frameworks, you can rely on vibe-coding tools to help you build your Chiliz Chain project:

{% content-ref url="/pages/PGfW4lG3ffqNvgzpf3fq" %}
[How to build a Chiliz dApp with AI tools](/develop/basics/how-tos/how-to-build-a-chiliz-dapp-with-ai-tools)
{% endcontent-ref %}


# How to get the balance of a wallet

Retrieve CHZ and token balances for a wallet on Chiliz Chain using the Moralis Wallet API, with code samples for single and multi-asset queries.

## What is the CHZ balance of a wallet?

The balance of a wallet refers to the total amount of a specific cryptocurrency that the wallet holds. Depending on your project, you might be need to display the balance of a single cryptocurrency, or the balances of all cryptocurrencies that a wallet holds.

Likewise, wallet assets refer to all forms of cryptocurrencies, tokens, and digital assets that are stored and managed within a cryptocurrency wallet.

## How to do it with Moralis

Moralis has a [Wallet API](https://moralis.com/api/wallet/) that you can make use of, and they even provide a code sample for the wallet balance use-case:

* [How to get the native balance of an address](https://docs.moralis.io/web3-data-api/evm/wallet-api/how-to-get-the-balance-of-a-wallet)

To adapt their code sample, we need to replace the reference to Ethereum with their ID for Chiliz Chain, `0x15b38`:

```typescript
import Moralis from "moralis";

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

  const address = "0xYourWalletAddress";

  const chain = "0x15b38", // This is for Chiliz Chain Mainnet.
                           // For Spicy Testnet, use "0x15b32".

  const response = await Moralis.EvmApi.balance.getNativeBalance({
    address,
    chain,
  });

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

runApp();
```

## How to do it with Tatum

Tatum has a comprehensive [Data API](https://tatum.io/blockchain-api) that you can make use of, and they even provide a code sample for the asset-retrieval use-case:

* [Get all assets the wallet holds](https://docs.tatum.io/docs/get-all-assets-the-wallet-holds)

To adapt their code sample, we need to replace the reference to Ethereum with Chiliz Chain:

```typescript
import {TatumSDK, Network, Chiliz, ResponseDto, AddressBalance} from '@@tatumio/tatum'

const tatum = await TatumSDK.init<Chiliz>({network: Network.CHILIZ})

const balance: ResponseDto<AddressBalance[]> = await tatum.address.getBalance({
  addresses: ['0xYourWalletAddress'], // replace with your address
})

console.log(balance.data)
```

## How to do it with thirdweb

thirdweb has several short code samples on their docs site, which we can use as an inspiration.

* [Get wallet balance](https://portal.thirdweb.com/connect/in-app-wallet/how-to/interact-with-wallets#get-wallet-balance)

Here is their code, [adapted to Chiliz](https://thirdweb.com/chiliz-chain):

```typescript
const sdk = new ThirdwebSDK("https://88888.rpc.thirdweb.com");
const walletAddress = "0xYourWalletAddress";

async function getWalletBalance() {
  try {
    const balance = await sdk.getBalance(walletAddress);
    console.log(`Balance of wallet ${walletAddress}: ${balance.displayValue} ${balance.symbol}`);
  } catch (error) {
    console.error("Error fetching wallet balance:", error);
  }
}

getWalletBalance();
```

## How to do it using Nodit

Nodit provides the following code sample [in their doc](https://developer.nodit.io/reference/chiliz-getnativebalancebyaccount):

```typescript
const url = 'https://web3.nodit.io/v1/chiliz/mainnet/native/getNativeBalanceByAccount';
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    'X-API-KEY': 'nodit-demo'
  },
  body: JSON.stringify({accountAddress: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```


# How to get the history of a wallet

Fetch a wallet's full transaction history on Chiliz Chain using the Moralis Wallet API, with code samples for credit/debit transaction records.

## What is the history of a wallet?

The history of a wallet refers to the complete record of all transactions, including both credits and debits, associated with a crypto wallet.

## How to do it with Moralis

Moralis has a Wallet API that you can make use of, and they even provide a code sample for the wallet history use-case:

* [Get wallet history](https://docs.moralis.io/web3-data-api/evm/reference/wallet-api/get-wallet-history)

To adapt their code sample, replace the reference to Ethereum with their ID for Chiliz Chain, `0x15b38`:

```typescript
import Moralis from 'moralis';

try {
  await Moralis.start({
    apiKey: "YOUR_API_KEY"
  });

  const response = await Moralis.EvmApi.wallets.getWalletHistory({
    "chain": "0x15b38", // This is for Chiliz Chain Mainnet.
                        // For Spicy Testnet, use "0x15b32".
    "order": "DESC",
    "address": "0xYourWalletAddress"
  });

  console.log(response.raw);
} catch (e) {
  console.error(e);
}
```

## How to do it with Tatum

Tatum has a comprehensive Data API that you can make use of, and they even provide a code sample for the wallet history use-case:

* [Get all transactions of a wallet](https://docs.tatum.io/docs/get-all-transactions-on-the-wallet)

To adapt their code sample, replace the reference to Ethereum with Chiliz Chain:

```typescript
// yarn add @tatumio/tatum
import {TatumSDK, Network, Chiliz, ResponseDto, AddressTransaction} from '@tatumio/tatum'

const tatum = await TatumSDK.init<Chiliz>({network: Network.CHILIZ})

const txs: ResponseDto<AddressTransaction[]> = await tatum.address.getTransactions({
  address: '0xYourWalletAddress', // replace with your address
})

console.log(txs.data)
```

## How to do it with thirdweb

thirdweb has several short code samples on their docs site, which we can use as an inspiration.

Sadly, they don't seem to have transactions specific functions, so we're going to rely on the [Chiliz Scan API](https://scan.chiliz.com/api-docs).

```typescript
const { ThirdwebSDK } = require("@thirdweb-dev/sdk");
const axios = require("axios");

const sdk = new ThirdwebSDK("https://rpc.ankr.com/chiliz");
const walletAddress = "0xYourWalletAddress";

// ChilizScan API URL and your API key (required)
const CHILIZ_SCAN_API_URL = "https://api.chilizscan.com/api";
const API_KEY = "YourChilizScanAPIKey"; // Optional, if the API requires authentication

async function getTransactionHistory() {
  try {
    const response = await axios.get(`${CHILIZ_SCAN_API_URL}?module=account&action=txlist&address=${walletAddress}&apikey=${API_KEY}`);
    const transactions = response.data.result;

    console.log(`Transaction history of wallet ${walletAddress}:`, transactions);
  } catch (error) {
    console.error("Error fetching transaction history:", error);
  }
}

getTransactionHistory();
```

## How to do it with Nodit

Nodit provides the following code sample [in their doc](https://developer.nodit.io/reference/chiliz-gettransactionsbyaccount):

```typescript
const url = 'https://web3.nodit.io/v1/chiliz/mainnet/blockchain/getTransactionsByAccount';
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    'X-API-KEY': 'nodit-demo'
  },
  body: JSON.stringify({
    accountAddress: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
    relation: 'both',
    fromDate: '2025-01-01T00:00:00+00:00',
    toDate: '2025-01-31T00:00:00+00:00',
    withCount: false,
    withLogs: false,
    withDecode: false
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```


# How to get the metadata of a specific NFT

Retrieve NFT metadata (image URL, name, attributes) for a specific token on Chiliz Chain using the Moralis NFT API.

## What is NFT metadata?

NFT metadata is the set of descriptive information stored off-chain that details the attributes, properties, and additional content associated with an NFT. These details can be an image URL, its name, description, and attributes related to its uniqueness and ownership.

## How to do it with Moralis

Moralis has an NFT API that you can make use of, and they even provide a code sample for the wallet history use-case:

* [Get NFT metadata](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-metadata?address=0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB\&token_id=1\&chain=eth\&format=decimal\&normalizeMetadata=true\&media_items=false)

To adapt their code sample, replace the reference to Ethereum with their ID for Chiliz Chain, `0x15b38`:

```typescript
import Moralis from 'moralis';

try {
  await Moralis.start({
    apiKey: "YOUR_API_KEY"
  });

  const response = await Moralis.EvmApi.nft.getNFTMetadata({
    "chain": "0x15b38", // This is for Chiliz Chain Mainnet.
                        // For Spicy Testnet, use "0x15b32".
    "format": "decimal",
    "normalizeMetadata": true,
    "mediaItems": false,
    "address": "0xYourNFTContractAddress",
    "tokenId": "1"
  });

  console.log(response.raw);
} catch (e) {
  console.error(e);
}
```

## How to do it with Tatum

Tatum has an NFT submodule to its blockchain abstraction tool that we can make use of, and they even provide a code sample for the metadata-retrieval use-case:

* [Get the metadata of a specific NFT](https://docs.tatum.io/docs/get-the-metadata-of-a-specific-nft)

To adapt their code sample, replace the reference to Ethereum with Chiliz Chain:

```typescript
import {TatumSDK, Network, Chiliz, ResponseDto, NftTokenDetail} from '@tatumio/tatum'

const tatum = await TatumSDK.init<Chiliz>({network: Network.CHILIZ})

const metadata: ResponseDto<NftTokenDetail|null> = await tatum.nft.getNftMetadata({
  tokenAddress: '0xYourNFTContractAddress', // replace with your collection
  tokenId: '1'
})

console.log(metadata.data)
```

## How to do it with thirdweb

thirdweb we can take inspiration from source code hosted on their documentation site:

* [ThirdwebNftMedia](https://portal.thirdweb.com/react/v4/components/ThirdwebNftMedia#usage)

Here is how we could adapt that into code to retrieve metadata:

```typescript
const { ThirdwebSDK } = require("@thirdweb-dev/sdk");

const sdk = new ThirdwebSDK("https://rpc.ankr.com/chiliz");
const nftContractAddress = "0xYourNFTContractAddress";
const tokenId = "YourTokenID";

async function getNFTMetadata() {
  try {
    const nftContract = await sdk.getNFTCollection(nftContractAddress);
    const nftMetadata = await nftContract.get(tokenId);
    console.log(`Metadata of NFT ${tokenId}:`, nftMetadata);
  } catch (error) {
    console.error("Error fetching NFT metadata:", error);
  }
}

getNFTMetadata();
```

## How to do it with Nodit

Nodit provides the following code sample [in their doc](https://developer.nodit.io/reference/chiliz-getnftmetadatabytokenids):

```typescript
const url = 'https://web3.nodit.io/v1/chiliz/mainnet/nft/getNftMetadataByTokenIds';
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    'X-API-KEY': 'nodit-demo'
  },
  body: JSON.stringify({
    tokens: [
      {contractAddress: '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D', tokenId: '1'},
      {contractAddress: '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D', tokenId: '2'}
    ]
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```


# How to build a Chiliz dApp with AI tools

Use AI vibe-coding tools (Cursor, Replit, Lovable, Claude Code, Bolt, V0) to build Chiliz Chain dApps with prompts and context for EVM development.

Vibe-coding is all the rage, and it can help you get started quickly with your Web3 project idea even if you don't know how to code!

This page will give you ideas on how to interact with your favorite AI tools in order to obtain the necessary information to generate your dApp

{% hint style="success" %}
This page is tool-agnostic: We give suggestions and prompt idea that can work in any vibe-coding tool, such as [Cursor](https://cursor.com/), [Replit](https://replit.com/), [Lovable](https://lovable.dev/), [Claude](https://claude.ai/), [Claude Code](https://www.anthropic.com/claude-code), [Bolt](https://bolt.new/), [V0](https://v0.dev/), [Base44](https://base44.com/), or any other AI code assistant.
{% endhint %}

## Prerequisites

Before you begin, ensure you have the following:

* A wallet with a Chiliz Chain account, such as MetaMask.
  * Use Spicy Testnet for safe testing, then Chiliz Chain Mainnet for production.

{% hint style="info" %}
Learn more about Metamask and how to connect it to Spicy Testnet and Chiliz Chain Mainnet here: [How to use MetaMask](/learn/about-wallets/how-to-use-metamask)
{% endhint %}

* Enough CHZ token on that wallet for deployment.
  * For Chiliz Chain Mainnet, you will need to buy CHZ. You can do so on any crypto exchange, such as [Coinbase](https://www.coinbase.com/) or [Meria](https://meria.com/).
  * For Spicy Testnet, you will need test CHZ tokens, available from [a faucet](/develop/basics/obtain-free-testnet-tokens).
* An account with an AI code assistant, such as ChatGPT, Gemini, Claude, or any other.
* A [Reown account](https://cloud.reown.com/sign-in) (to integrate the WalletKit connector).

## Find a dApp idea

The first step is to develop a compelling idea. Since you're building on Chiliz Chain, your concept should ideally bridge the gap between blockchain technology and the sports and entertainment world. Think about what fans might want.

{% hint style="info" %}
A strong idea will have a clear business case: How does it generate value? Who are the users?

Example dApp Idea: A Fan Prediction Market.

* Concept: Fans can use CHZ to bet on the outcome of upcoming matches (e.g., "Will Team A win against Team B?").
* Business Case: A small percentage fee (e.g., 2%) is taken from the winning pool upon settlement of a market. This fee is sent to a beneficiary wallet, creating a sustainable revenue stream.
  {% endhint %}

You can use an AI tool to brainstorm and refine your idea.

Once you have a solid concept, it's time to create the smart contract.

## Generating the Smart Contract with AI

Modern AI tools are surprisingly capable of writing secure, efficient smart contract code.

{% hint style="info" %}
Smart contracts are computer programs stored on a blockchain that are automatically executed when predetermined terms and conditions are met. Solidity is one of the main smart contract coding language.
{% endhint %}

### Key Prompting Instructions

When prompting your AI, always be very specific!

Your instructions must include:

1. Solidity Version: Specify a version at or below 0.8.30. This is because Chiliz Chain does not yet fully support the latest Solidity versions.
2. Don't reinvent the wheel: Tell the AI to base the contract on existing OpenZeppelin contract(s) as much as possible.

{% hint style="info" %}
[OpenZeppelin](https://www.openzeppelin.com/) is an open-source platform for building secure dApps.

In addition to several security and auditing services, they provide [a library of community-vetted smart contract](https://docs.openzeppelin.com/contracts/), free for the community to use in their projects.

As such, OpenZeppelin contracts are considered industry standards, and you can safely use them.
{% endhint %}

3. Flat Contract: Instruct the AI to generate a "flat" contract. This means that the code should be self-contained in a single file and not rely on external imports or dependencies. This simplifies verification later.
4. Wallet Addresses: Provide the wallet address that will own the contract (the deployer) and the address that will receive any fees (the beneficiary), if any.

Now it's up to you to prompt your AI tool!

After the AI generates the Solidity code, download it if possible, or copy it and save it as a `.sol` file on your computer.

## Compiling and Deploying

You now need to deploy your contract on Chiliz Chain.

We will use Remix IDE, a free, web-based environment, to debug, compile, and deploy your contract:

1. Open Remix IDE: Navigate to [remix.ethereum.org](https://remix.ethereum.org/).
2. Upload your contract: In the "File Explorers" tab on the left, create a new file and paste the Solidity code generated by your AI.
3. Compile the Contract:
   * Go to the "Solidity Compiler" tab.
   * Set the Compiler version to "0.8.30+xxx".
   * Click the Compile button.

You can see a more detailed Remix deployment guide here:

{% content-ref url="/pages/cwZqLlr1ee8FwupJJUCc" %}
[Deploy with Remix](/develop/basics/deploy-a-smart-contract/deploy-with-remix)
{% endcontent-ref %}

### Debugging with AI

It's common for the initial code to have errors. Remix's debugger is excellent at catching them.

If compilation fails, copy the error message from the Remix console. Go back to your AI tool and ask it to fix the spotted mistakes.

{% hint style="info" %}
You can use a prompt like this:

"The Solidity code you gave me produced the following error in Remix IDE. Please fix it: ..." and copy paste all error messages from Remix.
{% endhint %}

Repeat this process of compiling in Remix and getting fixes from your AI until the contract compiles successfully without any errors.

### Deploy to Spicy Testnet

Once the smart contract is compiled, you need to deploy it:

1. Go to the "Deploy & Run Transactions" tab in Remix.
2. For the Environment, select "Injected Provider - MetaMask". This will prompt your wallet to connect to Remix.
3. Ensure your MetaMask is connected to Spicy Testnet during your testing phase.
4. Click the Deploy button in Remix. Your wallet will pop up to ask you to confirm the transaction and pay the gas fee in test CHZ tokens.

After confirming, you should see your deployed contract under the "Deployed Contracts" section in Remix. The transaction will also be available on [Chiliscan Spicy](https://testnet.chiliscan.com/).

## Verifying the Contract

You now need to verify the smart contract on-chain. A verified contract is transparent and trustworthy. It allows users to read and audit your source code directly on the block explorer.

Here is how to do it with [Chiliscan Spicy](https://testnet.chiliscan.com/):

1. On Chiliscan, find your deployment transaction and copy the new contract's address.
2. Open the [Chiliscan Spicy Contract Verifier](https://testnet.chiliscan.com/verifycontract).
3. Fill the Verification Form: You will need to provide several pieces of information.

{% hint style="info" %}
You can ask your AI tool for help with a prompt like this:

"I need to verify my Solidity smart contract on Chiliscan. The contract address is `0xxxxxxxx`. The compiler version I used was 0.8.30. Can you tell me what to put in the fields for ... ?"
{% endhint %}

4. Submit the form. If all details are correct, your contract's source code will now be public on Chiliscan!

## Building the Frontend with a vibe-coding tool

Now that your smart contract is live and verified, you need a user interface (UI) for people to interact with it. You can use any vibe-coding tool for this:

1. Log in to your chosen Coding Assistant account.
2. Start a new project and begin prompting the AI. Be clear about what you want to build.

{% hint style="info" %}

#### **Example prompt**

"I want to build a frontend for my Chiliz Chain dApp. For now I need you to create for Spicy Testnet:

* RPC endpoint: <https://spicy-rpc.chiliz.com/>
* RPC Websocket: wss\://spicy-rpc-ws.chiliz.com/
* Chain ID: 88882
* Currency Symbol: CHZ

I want my dApp to do this: XXX.\
Smart Contract Address: \[YOUR\_DEPLOYED\_CONTRACT\_ADDRESS]\
My Wallet Addresses:

* The owner is \[YOUR\_OWNER\_ADDRESS]
* The beneficiary is \[YOUR\_BENEFICIARY\_ADDRESS].

Instructions:

* Create a web interface using using the most common tools for dApps.
* It should display xxxx.
* Users should be able to xxxx.
* The owner should a password-protected admin panel to create xxxx."
* xxxx"
  {% endhint %}

Be as specific as possible! And don't hesitate to iterate.

## Integrating User Wallets

For users to connect their own wallets to your dApp, you'll need a wallet connector solution. Your chose AI tool should be able to integrate [Reown's WalletKit](https://reown.com/walletkit) for you.

You will need to create a Reown account:

1. [Sign up for a Reown Cloud account](https://cloud.reown.com/sign-in) if you haven't already, then connect to it.
2. Click on "Create Project". Enter the name for your project and click on "Continue".
3. Select the product as “WalletKit” and click on "Continue".
4. Select the framework as “Next.js” and click on "Create".

Reown Cloud will now create a new project for you which will also generate a project ID. You will find it on the top left corner: Copy that ID as you will need it later.

Then, instruct your AI tool to handle the integration.

{% hint style="info" %}

#### **Example prompt**

"Add wallet connection functionality using Reown's WalletKit. I will provide you with my WalletKit project ID and API keys after I create an account. Set it up so that the 'Connect Wallet' button uses WalletKit."
{% endhint %}

Follow the instructions from your AI and WalletKit to complete the setup. You will need to copy-paste some information from your WalletKit account into your AI project.

Continue to query and test within the AI's environment until your dApp's frontend is fully functional and you are satisfied with the result.

## Moving to Chiliz Chain Mainnet

So far we've asked all AI tools to work with Spicy Testnet in mind. This is essential to test-drive your app on a safe blockchain, but it cannot be used for production project, notably because it only works with test CHZ tokens, not real CHZ tokens.

To move your app from Spicy Testnet to Chiliz Chain Mainnet, you will need to redo most of the above steps one last time:

1. Deploy your contract with Remix again, but this time with Chiliz Chain Mainnet.
2. Check that the contract is indeed deployed with [Chiliscan Mainnet](https://chiliscan.com/).
3. Verify the contract on [Chiliscan Mainnet Contract Verifier](https://chiliscan.com/verifycontract).
4. Finally, tell your aI to update the app to use Chiliz Mainnet now. Be specific!

{% hint style="info" %}

#### **Example prompt**

"I want to update the app for Chiliz Chain Mainnet. You must only update the RPC URL and ChainID, nothing else:\
\* RPC endpoint: <https://rpc.ankr.com/chiliz\\>
\* Chain ID: 88888"
{% endhint %}

## Final test

Test your app one last time before you share it with anyone else.

That's it! You now have a full-stack, AI-assisted dApp live on Chiliz Chain!


# Tips & Tricks

Chiliz Chain developer tips: create unlimited ERC-20 test tokens on Spicy Testnet, get current gas prices via RPC, and workaround faucet daily limits.

## How to create your own token on Spicy Testnet

Developping an app on Chiliz Chain Mainnet requires first to test it on Spicy Testnet, in order to check that your code handles testCHZ tokens well without having to use tons of expensive CHZ tokens. For that purpose, you can obtain Testnet tokens for free through our Spicy Faucets:

{% content-ref url="/pages/Af9548Yd4RQMNgtsUkq9" %}
[Obtain Free Testnet Tokens](/develop/basics/obtain-free-testnet-tokens)
{% endcontent-ref %}

But sometimes development requires a lot of test tokens, and the faucets are limited in how many tokens you can get each day.

In order to free yourself from this limitation, you can create your own token on Spicy Testnet! Indeed, Chiliz Chain (Mainnet and Testnet) are EVM-compatible chains, and the CHZ and testCHZ tokens are really ERC20 tokens.

You can therefore mint your own, quasi-unlimited ERC20 token on Spicy Testnet, and test your code thoroughly with that token. Then, once you feel you're ready, test your dApp with test CHZ tokens on Spicy a few more times before going live on Chiliz Chain Mainnet.

Here are the steps to create your own token on Spicy Testnet:

1. [Connect MetaMask to Chiliz Spicy Testnet](/learn/about-wallets/how-to-use-metamask/link-chiliz-chain-and-metamask).
2. [Get test CHZ tokens from the Spicy Faucet](/develop/basics/obtain-free-testnet-tokens). This is needed because you will need CHZ tokens to deploy your ERC20 contract.
3. Write the token's smart contract (we recommend relying on [OpenZeppelin's ERC20](https://docs.openzeppelin.com/contracts/5.x/erc20)). In your `constructor`, set the token's name (e.g., "MyOwnToken"), symbol (e.g., "MOT"), and mint an initial supply that's enough for your needs.
4. [Compile the contract and deploy it to Spicy Testnet](/develop/basics/deploy-a-smart-contract), then verify it through a [block explorer](/develop/basics/use-a-block-explorer).
5. View your new token in MetaMask:
   1. Copy your token's contract address from your deployment toolset (e.g., Remix's "Deployed Contracts" menu).
   2. In MetaMask, go to the "Tokens" tab and click "Import tokens".
   3. Paste the contract address. The symbol and decimals should auto-fill.
   4. Click "Add custom token" and then "Import tokens". You should now see your new token balance.

You're now ready to test your Chiliz Chain dApp on Spicy Testnet with your own token!

## How to get the current gas price

To get the gas price on Chiliz Chain, you can use [one of the public RPC nodes](https://docs.chiliz.com/develop/connect-to-chiliz-chain/connect-using-rpc).

You can obtain the current gas price like so:

```bash
curl --location 'https://rpc.ankr.com/chiliz' # For Spicy: https://spicy-rpc.chiliz.com/
--header 'Content-Type: application/json' 
--data '{ 
    "method": "eth_gasPrice", 
    "params": [], 
    "id": 1, 
    "jsonrpc": "2.0"
}'
```

## How to check why a transaction failed

A transaction might fail, and you don't always know why, especially since the block explorer doesn't display the error.

{% hint style="warning" %}
To ensure that your transaction doesn't remain in "pending" status for too long, you should include enough to cover the fees:

* Minimum gas fee: 2,501 Gwei.
* Minimum priority fee: 1 Gwei.
  {% endhint %}

To check why your transaction failed, run the following script in the terminal with the correct transaction ID:

```bash
curl --location 'https://rpc.ankr.com/chiliz' # For Spicy: https://spicy-rpc.chiliz.com/
--header 'Content-Type: application/json' 
--data '{
    "method": "debug_traceTransaction",
    "params": [
        "[Transaction ID]",
        {
            "tracer": "callTracer"
        }
    ],
    "id": 1,
    "jsonrpc": "2.0"
}'
```


# Advanced

Advanced developer guides for Chiliz Chain: gas estimation, Fan Token tracking, account abstraction, omnichain bridging, NFT minting, and Socios.com Wallet integration.


# Estimate gas fees

Estimate transaction gas fees on Chiliz Chain using cURL/RPC, Blocknative Gas Network, or ethers.js, with minimum fee guidance (2,501 gwei base, 1 gwei priority).

Transaction fees (or "gas fees") can vary significantly depending on network activity, so having a reliable estimation method is crucial for a smooth user experiences.

{% hint style="warning" %}
To ensure that your transaction doesn't remain in "pending" status for too long, you should include enough to cover the fees:

* Minimum gas fee: 2,501 Gwei.
* Minimum priority fee: 1 Gwei.
  {% endhint %}

## What does it mean for Chiliz Chain developers?

Just like with any blockchain, you must pay gas for every transaction on Chiliz Chain.

The key is to balance cost-effectiveness with timely confirmations to avoid failing or delayed transactions. Keeping your gas estimates up to date helps prevent both overpaying and underpaying.

## How to do it natively

If you want to keep it *vanilla*, you can rely on a [cURL](https://curl.se/) request to a [Chiliz Chain RPC server](/develop/basics/connect-to-chiliz-chain/connect-using-rpc). See here: [Tips & Tricks](/develop/basics/tips-and-tricks#how-to-get-the-current-gas-price).

## How to do it through an explorer API

Both [Chiliscan](https://chiliscan.com/) and [Chiliz Block Explorer](https://scan.chiliz.com/) offer APIs allowing you to get the current gas price for Chiliz Chain.

{% hint style="warning" %}
You need an API key in order to interact with the available API methods/endpoints.
{% endhint %}

{% hint style="info" %}
Both explorer also have a "Gas tracker" page:

* <https://chiliscan.com/insight/leaderboard/gas-tracker>
* <https://scan.chiliz.com/gas-tracker>
  {% endhint %}

### Using Chiliscan's API

The Chiliscan API provides the `avg-gas-price` method for that purpose:

{% embed url="<https://chiliscan.com/documentation/api/swagger>" %}

{% code overflow="wrap" %}

```bash
curl -X 'GET' \
  'https://api.routescan.io/v2/network/mainnet/evm/88888/aggregations/avg-gas-price?apikey=YourApiKeyToken' \
  -H 'accept: application/json'
```

{% endcode %}

... which will return a JSON string with the current value.

### Using Chiliz Block Explorer's API

The Chiliz Block Explorer API has the stats endpoint which provides that information:

{% embed url="<https://scan.chiliz.com/api-docs?tab=rest_api>" %}

```bash
curl -X 'GET' \
  'https://scan-api.chiliz.com/api/v2/stats' \
  -H 'accept: application/json'
```

The endpoint returns which includes gas price information. For example:

```json
{
  "total_blocks": "508700",
  "total_addresses": "982340",
  "total_transactions": "1699427",
  "average_block_time": 25000,
  "coin_price": "0.00254957",
  "total_gas_used": "0",
  "transactions_today": "622",
  "gas_used_today": "49063630",
  "gas_prices": {
    "average": 10,
    "fast": 10,
    "slow": 10
  },
  "static_gas_price": "10.1",
  "market_cap": "420471.10604559750644",
  "network_utilization_percentage": 40.2142
}
```

You'll want to use this section (prices are in Gwei):

```json
"gas_prices": {
    "average": 10,
    "fast": 10,
    "slow": 10
  },
```

{% hint style="info" %}

* `average` balances a moderate cost with reliable inclusion in the next few blocks.
* `fast` pays the highest premium to incentivize validators to prioritize your transaction immediately, ensuring the quickest possible confirmation for urgent needs.
* `slow` offers the lowest fee but carries the risk of your transaction remaining pending if network congestion increases.
  {% endhint %}

## How to do it using Blocknative?

[Blocknative](https://www.blocknative.com/) builds infrastructure to monitor and manage the complexity of transacting on public blockchain networks.

Blocknative’s [Gas API](https://docs.blocknative.com/gas-prediction/gas-platform) offers a reliable, real-time approach to retrieving gas prices.

### Step 1: Get a key

To use Blocknative's Gas API in your project, you will need an API Key.

You will need to [join the Gas Network first](https://www.gas.network/), which will give you access to your own API key.

### Step 2: Implement the call to the Gas API

Once you have an API key, you can request fee estimation for Chiliz.

{% hint style="info" %}
Remember that the chain ID for Chiliz Chain Mainnet is `88888`.
{% endhint %}

The simplest way is to call on the API via a REST request. For instance, via command line:

{% code overflow="wrap" %}

```bash
curl -H "Authorization: your-apikey-here" \
  'https://api.blocknative.com/gasprices/blockprices?chainid=88888'
```

{% endcode %}

Learn more in [the Blocknative documentation](https://docs.blocknative.com/gas-prediction/gas-platform).


# Get on-chain price feeds

Read live asset and Fan Token prices directly in your smart contracts.

Chiliz Chain provides an on-chain, institutional-grade price feed system that delivers reliable, tamper-resistant asset prices directly to smart contracts. It implements the **Chainlink AggregatorV3Interface**: any dApp already integrated with Chainlink data feeds can connect with minimal changes.

Price data is sourced from multiple major centralised exchanges, aggregated via VWAP (Volume Weighted Average Price), filtered for outliers, and pushed on-chain by a permissioned signer in a fully automated, high-frequency pipeline.

## How It Works

The oracle system is built as a three-stage off-chain pipeline that continuously pushes validated prices into on-chain contracts.

```mermaid
flowchart LR
    subgraph pipeline["Off-chain Pipeline"]
        direction LR
        FETCHER --> AGGREGATOR --> SIGNER
    end
    SIGNER --> pricefeed["Chiliz Chain\nPriceFeed Contracts"]
```

**Stage 1: Fetcher**\
Pulls real-time market data from centralised exchanges via WebSocket streams (Binance, Bybit, Bitget, Mexc, OKX, BingX) and REST polling (Binance, Bybit, Bitget, Gate, Coinex), plus subgraph queries (FanX). All fetched prices are stored in an internal cache, ready for the Aggregator.

**Stage 2: Aggregator**\
Applies VWAP calculation, ensuring higher-liquidity venues are given more weight, then filters for outliers. Decides whether to submit an update on-chain based on two rules:

* **Deviation threshold**: an update is submitted if the aggregated price has moved beyond a configured percentage (e.g. 0.5%) from the last on-chain value.
* **Heartbeat**: even if the price hasn't moved beyond the deviation threshold, an update is forced once the maximum time interval has elapsed. This guarantees the feed is never stale.

**Stage 3: Signer**\
Receives validated price jobs from the Aggregator and submits them on-chain via Fireblocks, an institutional-grade signing solution. The Signer only acts when the Aggregator says a price is ready.

## Contract System

| Contract                | Role                                                                                                                                                  |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **PriceFeed**           | One contract per trading pair. This is the contract your dApp reads from. Implements Chainlink AggregatorV3Interface.                                 |
| **OracleFactory**       | Registry and manager. Holds the authoritative mapping from pair symbol (e.g. `"PSG/USDT"`) to oracle address.                                         |
| **OracleFactoryReader** | Read-only convenience contract. Fetch all active oracle addresses, resolve multiple pairs, or check health status across the system in a single call. |

The oracle contracts have been audited by [Halborn](https://www.halborn.com/audits/chiliz/oracle-contracts-40e905) (January 2026).

## Contract Addresses

Network parameters for both Mainnet and Testnet are available in the [Developer Toolbox](/quick-start/developer-toolbox).

{% tabs %}
{% tab title="Chiliz Chain Mainnet" %}

<table><thead><tr><th width="253">Contract</th><th>Address</th></tr></thead><tbody><tr><td>OracleFactory</td><td><code>Coming soon...</code></td></tr><tr><td>OracleFactoryReader</td><td><code>Coming soon...</code></td></tr></tbody></table>
{% endtab %}

{% tab title="Spicy Testnet" %}

<table><thead><tr><th width="253">Contract</th><th>Address</th></tr></thead><tbody><tr><td>OracleFactory</td><td><code>0x824A1C121DD4baeA7f074f829294Af7DD10D9723</code></td></tr><tr><td>OracleFactoryReader</td><td><code>0x8908cd1586e90b399Dbc160Be98396172ef2F378</code></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

The [Price Oracle Tracker](https://price-oracle-tracker.vercel.app/?network=mainnet) shows all available pairs with live prices, decimals, heartbeat parameters, and individual contract addresses.


# Reading prices

Find a PriceFeed contract address, connect using the Chainlink interface, and read the current price with proper validation.

## Step 1: Find the Oracle Address

Three ways to find a `PriceFeed` contract address for a given pair:

* **Price Oracle Tracker** (easiest during development): [price-oracle-tracker.vercel.app](https://price-oracle-tracker.vercel.app/?network=mainnet), which shows all deployed pairs, live prices, decimals, heartbeat, and addresses.
* **On-chain via OracleFactory**: call `pairToOracle(string pair)`. Pair symbols must be passed in uppercase (e.g. `"PSG/USDT"`); the factory does not normalise input on reads.
* **Bulk on-chain via OracleFactoryReader**: call `getActiveOracles()` to retrieve all active pairs and their addresses in one call.

```solidity
interface IOracleFactory {
    function pairToOracle(string memory pair) external view returns (address);
    function getOracleCount() external view returns (uint256);
}

function resolveFeed(address factory, string memory pair)
    external view returns (address)
{
    // Pair symbol must be passed in uppercase (e.g. "PSG/USDT").
    return IOracleFactory(factory).pairToOracle(pair);
}
```

## Step 2: Connect Using the Interface

The `PriceFeed` contract implements the standard Chainlink `IAggregatorV3Interface`, plus Chiliz-specific extensions for health and pause status.

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

interface IAggregatorV3Interface {
    function decimals() external view returns (uint8);
    function description() external view returns (string memory);
    function version() external view returns (uint256);

    function getRoundData(uint80 _roundId)
        external view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );

    function latestRoundData()
        external view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );
}

interface IChilizPriceFeed is IAggregatorV3Interface {
    function paused() external view returns (bool);
    function updateInterval() external view returns (uint256);
    function healthFactor() external view returns (uint80);
    function getHealthStatus()
        external view
        returns (
            uint256 lastUpdateTimestamp,
            uint256 totalRounds,
            uint256 timeSinceLastUpdate,
            bool isHealthy
        );
}
```

## Step 3: Read the Price

{% hint style="warning" %}
**The feed does not revert on stale or paused state; this is intentional.** `latestRoundData()` reverts with `NoDataAvailable()` if no rounds exist yet, but it does not check whether the feed is paused or stale. This matches the Chainlink AggregatorV3Interface design: consumers are responsible for gating on `paused()` and `getHealthStatus()` before consuming a price. Note: the scalar helpers (`latestAnswer()`, `latestTimestamp()`, `getAnswer()`, `getTimestamp()`) return `0` rather than reverting when no data is present. See [Best Practices](/develop/advanced/get-asset-and-fan-token-prices/best-practices) for the full validation pattern.
{% endhint %}

The primary function is `latestRoundData()`, which returns the current price alongside round and timestamp metadata.

```solidity
contract LendingOracleConsumer {
    IChilizPriceFeed public priceFeed;

    constructor(address _feed) {
        priceFeed = IChilizPriceFeed(_feed);
    }

    function getSafePrice() public view returns (uint256 price18) {
        // 1. Check feed is not paused
        require(!priceFeed.paused(), "Feed paused");

        // 2. Read latest data (reverts with NoDataAvailable() if no rounds exist)
        (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        ) = priceFeed.latestRoundData();

        // 3. Basic sanity checks
        require(answer > 0, "Invalid price");

        // 4. Optional: use explicit health check for staleness
        (, , , bool isHealthy) = priceFeed.getHealthStatus();
        require(isHealthy, "Stale price");

        // 5. Normalize to 18 decimals for internal math
        uint8 decimals_ = priceFeed.decimals();
        uint256 scale = 10 ** uint256(decimals_);
        price18 = uint256(answer) * 1e18 / scale; // This is the actual price of an asset
    }
}
```

If your protocol uses the feed's native decimals rather than normalising to 18:

```solidity
function getRawPriceWithMeta()
    external view
    returns (int256 price, uint8 decimals_, uint256 updatedAt)
{
    require(!priceFeed.paused(), "Feed paused");

    (, int256 answer, , uint256 _updatedAt, ) =
        priceFeed.latestRoundData();
    require(answer > 0, "Invalid price");

    (, , , bool isHealthy) = priceFeed.getHealthStatus();
    require(isHealthy, "Stale price");

    decimals_ = priceFeed.decimals();
    price = answer;
    updatedAt = _updatedAt;
}
```

## Historical Data

The oracle stores all historical round data on-chain. Each price update creates a new round with an incrementing `roundId`.

```solidity
(uint80 roundId, int256 answer, , uint256 updatedAt, ) =
    priceFeed.getRoundData(targetRoundId);
```

Additional helper views exposed by the Chiliz feed:

| Function                           | Returns                                |
| ---------------------------------- | -------------------------------------- |
| `latestAnswer()`                   | Latest price, or `0` if none           |
| `latestTimestamp()`                | Latest `updatedAt`, or `0` if none     |
| `latestRound()`                    | Current round ID                       |
| `getAnswer(uint80 roundId)`        | Price for a specific round, or `0`     |
| `getTimestamp(uint80 roundId)`     | Timestamp for a specific round, or `0` |
| `getRoundsData(uint80[] roundIds)` | Bulk `RoundData` array                 |
| `roundExists(uint80 roundId)`      | `true` if `updatedAt > 0`              |

## Events

Each `PriceFeed` contract emits:

* **`AnswerUpdated(int256 indexed current, uint80 indexed roundId, uint256 updatedAt)`**: emitted on every price update. Filter by price or round.
* **`NewRound(uint80 indexed roundId, address indexed startedBy, uint256 startedAt)`**: emitted when a new round begins. Filter by round or by the address that started it.

## Discovery Functions (OracleFactoryReader)

| Function                                | Description                                                 |
| --------------------------------------- | ----------------------------------------------------------- |
| `getActiveOracles()`                    | Returns all active pairs with their oracle addresses        |
| `getAllOracles()`                       | Returns all oracles, including inactive ones                |
| `getOraclesByPairs(string[] pairs)`     | Resolve multiple pair names to oracle addresses in one call |
| `getOracleHealthStatus(address oracle)` | Health status for a single oracle                           |
| `getAllOracleHealthStatus()`            | Health status for every oracle in the system                |


# Best practices

Validation patterns, health status API, staleness checks, and an integration checklist for safely consuming Chiliz Chain price feeds.

## Always Validate Before Using a Price

`latestRoundData()` reverts with `NoDataAvailable()` if no rounds exist, but does not enforce staleness or pause checks: it returns stored values as-is. Before consuming any price value, always perform these three checks:

1. **Pause check**: call `paused()` and reject if the feed is paused.
2. **Positive answer**: require `answer > 0`.
3. **Staleness check**: gate on `getHealthStatus().isHealthy`.

The `getSafePrice()` example in [Reading Prices](/develop/advanced/get-asset-and-fan-token-prices/reading-prices) implements all three.

## Health Status API

Each `PriceFeed` exposes a `getHealthStatus()` view that aggregates freshness information in a single call:

```solidity
function getHealthStatus()
    external view
    returns (
        uint256 lastUpdateTimestamp,
        uint256 totalRounds,
        uint256 timeSinceLastUpdate,
        bool isHealthy
    );
```

| Field                 | Description                                                               |
| --------------------- | ------------------------------------------------------------------------- |
| `lastUpdateTimestamp` | `updatedAt` of the most recent round                                      |
| `totalRounds`         | Total number of rounds written                                            |
| `timeSinceLastUpdate` | `block.timestamp - lastUpdateTimestamp` (or `block.timestamp` if no data) |
| `isHealthy`           | `true` if `timeSinceLastUpdate <= updateInterval × healthFactor`          |

The health factor is initialised to `2` by default but is configurable per feed by the oracle admin via `setHealthFactor()`. Do not hardcode `2`. Read it directly from the contract:

```solidity
uint80 factor = priceFeed.healthFactor(); // per-feed; do NOT assume the default of 2 (live feeds use 720)
```

The health window is `updateInterval × healthFactor`, both configured per feed. `updateInterval` is a small on-chain minimum spacing, not the heartbeat. It varies per feed: CHZ/USDC uses `5s × 720 = 1-hour` window, PEPPER/CHZ uses `10s × 720 = 2-hour` window, while the off-chain pipeline pushes on a \~1-hour heartbeat. Never use `updateInterval` alone as a staleness baseline; gate on `isHealthy`. See `getSafePrice()` in [Reading Prices](/develop/advanced/get-asset-and-fan-token-prices/reading-prices) for the full pattern.

Use `getAllOracleHealthStatus()` on the `OracleFactoryReader` to monitor every feed in the system at once (useful for off-chain dashboards and alerting).

## Cache `decimals()`

Each pair has its own decimal precision: always call `decimals()` to confirm before interpreting a price value. Decimals are set at deployment and never change, so read them once at contract initialisation rather than on every price read:

```solidity
uint8 public immutable feedDecimals;

constructor(address _feed) {
    priceFeed = IChilizPriceFeed(_feed);
    feedDecimals = priceFeed.decimals();
}
```

## Handle the Paused State Gracefully

In an emergency, the oracle manager can pause a feed. Handle the resulting revert cleanly rather than silently consuming a bad value:

```solidity
require(!priceFeed.paused(), "Feed paused");
```

## Use the Tracker During Development

The [Price Oracle Tracker](https://price-oracle-tracker.vercel.app/?network=mainnet) lets you compare on-chain prices against CoinMarketCap and CoinGecko in real time, making it easy to validate feed accuracy during integration. It also shows live health status, heartbeat parameters, and individual contract addresses for every pair.

## Integration Checklist

* [ ] Obtain the `PriceFeed` address via the tracker, `pairToOracle()`, or `getActiveOracles()`
* [ ] Confirm the pair description and decimals using `description()` and `decimals()`
* [ ] Cache `decimals()` at contract initialisation
* [ ] Read prices via `latestRoundData()` (reverts with `NoDataAvailable()` if no rounds exist yet)
* [ ] Check `paused()` before consuming a price
* [ ] Validate `answer > 0`
* [ ] Gate on `getHealthStatus().isHealthy` for staleness (do not derive your own threshold from `updateInterval` alone)
* [ ] Normalise the price to your internal precision (e.g. 18 decimals) if needed
* [ ] Test on Spicy Testnet before deploying to Mainnet


# How to get the USD price of Fan Tokens

Get real-time USD prices for Fan Tokens on Chiliz Chain using the Pyth oracle network, with 420+ price feeds including $CHZ, $PSG, $BAR, $CITY, and other Fan Token tickers.

Your smart contract doesn't have to live in an ivory tower. It can benefit from using real-world data.

Accessing external, real-world data is useful because it allows smart contracts to execute based on real-time events and conditions, making them more versatile and applicable to a wide range of scenarios.

In the blockchain world, this is done through what we call an Oracle.

## What is an Oracle?

Oracles bridge blockchains with the external world, allowing smart contracts to access real-world data, crucial for applications in finance, supply chains, and gaming.

Oracles are essential for blockchain's real-world integration.

## What does it mean for Chiliz Chain developers?

Provided you get access to an Oracle that offers real-time data that is relevant to your project, you can build something that remains up-to-date with the real world.

## How to do it using Pyth?

Pyth Network primarily provides high-fidelity financial market data.\
Pyth’s most well-known oracle is Price Feeds, which provides real-time prices for many assets on several blockchain ecosystems, including Solana, many EVM chains, Aptos, Sui, NEAR, and several Cosmos chains.

In particular, Pyth's Price Feeds gives you access to the live value of Fan Tokens™ in US dollars, such as [PSG](https://pyth.network/price-feeds/crypto-psg-usd), [JUV](https://pyth.network/price-feeds/crypto-juv-usd), [BAR](https://pyth.network/price-feeds/crypto-bar-usd) and [others](https://pyth.network/price-feeds) (search for "fan tokens" on that page).

The Pyth documentation provides a complete explanation on [how to use real-time data in EVM contracts](https://docs.pyth.network/price-feeds/use-real-time-data/evm).


# Integrate Socios.com Wallet in your dApp

Integrate the Socios.com Wallet in your Chiliz Chain dApp's Connect Wallet flow using Reown AppKit or WalletConnect, with chain IDs 88888 (Mainnet) and 88882 (Spicy Testnet).

dApps typically have a “Connect Wallet” button to trigger a pop-up window where the user can select their wallet provider. The pop-up would then send a message to the chosen wallet in order to verify that this user does own this wallet address.

There are several ways of integrating the Socios Wallet into your dApp's "Connect Wallet" pop-up modal. By relying on reputed tools, you can provide a secure and seamless experience that works with multiple wallet providers (such as MetaMask & others) and chains, including Chiliz Chain (both Spicy Testnet and Chiliz Mainnet).

This page aims to present you with various options to choose from.

{% hint style="info" %}
Because you are targeting Chiliz Chain, ensure you specify the correct `chainId` in your configuration:

* 88882: Spicy Testnet
* 88888: Chiliz Mainnet

Start by testing your integration on Spicy Testnet (88882), confirm that everything runs smoothly, and only then move to Chiliz Mainnet (88888).

See all parameters here: [Connect to Chiliz Chain](/develop/basics/connect-to-chiliz-chain)
{% endhint %}

## Pick your libraries & frameworks

You can leverage various external tools to streamline wallet connectivity, multi-chain support, and advanced features. Choose your tool based on your project’s tech stack.

### Reown (previously WalletConnect)

{% hint style="info" %}
[Reown](https://reown.com/) is the [name](https://reown.com/blog/walletconnect-is-now-reown) of WalletConnect Inc. since 2024.\
The well-known WalletConnect wallet connection toolkit is now called [Reown SDK](https://reown.com/reown-sdk) (or AppKit). It was formerly know as Web3Modal.
{% endhint %}

Reown has a [step-by-step guide to using AppKit](https://docs.reown.com/appkit/networks/evm#get-started), and you should also read [their full documentation](https://docs.reown.com/appkit/overview).

{% hint style="warning" %}
**REQUIRED**

The Socios.com Wallet implements the [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) standard, which means that the smart contract behind it implements the `isValidSignature()` method instead of `erecover()`.

Therefore, your dApp MUST support ERC-1271 and implement a call to `isValidSignature()`.

See [the Reown doc](https://docs.reown.com/advanced/api/sign/smart-contract-wallet-usage#messages) for more.
{% endhint %}

### RainbowKit

[RainbowKit](https://rainbowkit.com/) is a React library for adding wallet-connection features. It relies on [viem](https://viem.sh/) and [Wagmi](https://wagmi.sh/) , and provides pre-built components for a modern, user-friendly integration flow.

View [their own introduction](https://rainbowkit.com/docs/introduction) to learn more about it.

### Moralis

[Moralis](https://docs.moralis.com/) offers ready-made authentication flows for EVM-compatible chains (including Chiliz Chain if configured properly), as well as server-side methods to validate and manage user sessions.

If you already use Moralis, you can use it to create your dApps "Connect Wallet" button with several methods/tools:

* [How to Authenticate Users with WalletConnect](https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-wallet-connect)
* [How to Authenticate Users with RainbowKit](https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-rainbow-kit)
* [How to Authenticate Users with Magic.Link](https://docs.moralis.com/get-started/tutorials/auth-api/authenticate-users-with-magic-link)
* etc.

They also have longform blogposts about each:

* [WalletConnect Integration – How to Integrate WalletConnect](https://developers.moralis.com/walletconnect-integration-how-to-integrate-walletconnect/)
* [How to Add a Sign In with RainbowKit to Your Project in 5 Steps](https://developers.moralis.com/how-to-add-a-sign-in-with-rainbowkit-to-your-project-in-5-steps/)

### thirdweb

[thirdweb](https://portal.thirdweb.com/) offers [Connect](https://thirdweb.com/learn/guides/thirdweb-connect-explained), a flexible sign-up flow that accommodates different preferences is critical when onboarding users.

You can rely on their [Wallets doc](https://portal.thirdweb.com/connect/wallet/sign-in-methods/external-wallets), and even play with their [ConnectButton playground](https://playground.thirdweb.com/connect/sign-in/button).

## Recommend Socios.com Wallet in the pop-up modal

You can customize the display of the pop-up modal to feature Socios.com Wallet:

* With Reown/WalletConnect: Customize the "Recommended Wallet" section of the modal using the [`explorerRecommendedWalletIds`](https://docs.reown.com/advanced/walletconnectmodal/options#explorerrecommendedwalletids-optional) option.
* With RainbowKit: You can build your own list of wallets using the [`connectorsForWallets`](https://www.rainbowkit.com/docs/custom-wallet-list) option.

## Ensure an optimal experience for your users

For a better user experience, we recommend you to store the user's wallet address in the session storage on your dApp, or in the user profile. This way, the user won't have to connect to their wallet address every time they come on your platform.

## Supported methods

Socios.com Wallet supports the following methods:

* `eth_sendTransaction`
* `eth_signTransaction`
* `personal_sign`

We plan to follow the following methods soon:

* `eth_signTypedData`
* `eth_signTypedData_v4`

## SIWE verification

If you wish to use Socios.com Wallet to authenticate using [SWIE](https://eips.ethereum.org/EIPS/eip-4361), please note that the Socios.com Wallet is an SCA wallet rather than a regular EOA wallet.\
\&#xNAN;*Ethereum's ecosystem includes two primary account types: Smart Contract Accounts (SCAs) and Externally Owned Accounts (EOAs).*

While the signature for EOA wallets can be verified with `ecrecover` (e.g. using `ethers.utils.verifyMessage` ), the EIP-1271 standard (which Socios.com Wallet uses) requires calling the contract’s `isValidSignature` method to verify it.

So when authenticating an account, you need to first check if the address is a contract, and depending on that, pick up the proper verification method.


# Follow transfers of a Fan Token

Track Fan Token transfer history on Chiliz Chain using subgraphs with The Graph or Goldsky: event indexing, GraphQL queries, and building a token dashboard.

Tracking Fan Token movements on Chiliz Chain is a great way to monitor the activity of your favourite tokens. By using it as a building block for a potential dashboard, you can streamline data to provide insights into what's popular and what's not.

When tracking Fan Token™movements, you quickly run into a challenge: reading data directly from the blockchain is efficient for current status ("*What is the balance of wallet X?*"), but inefficient for historical data ("*Show me every transfer involving wallet X over the last year*").

To solve this, we can use subgraphs.

## About subgraphs

A Subgraph is a custom API that extracts data from a blockchain, processes it, and stores it so it can be easily queried.\
Instead of asking the blockchain to scan millions of blocks every time you need data, a subgraph indexes specific events as they happen and stores them in a database.

Chiliz Chain supports industry-standard indexing protocols. You can choose the provider that best fits your project's needs:

* [The Graph](https://thegraph.com/): The industry standard for decentralized indexing. It allows you to deploy your subgraph to a decentralized network of indexers.
* [Goldsky](https://goldsky.com/): A high-performance, hosted indexing service. It is fully compatible with The Graph's code (you can often use the exact same code) but offers faster indexing speeds and real-time data streaming features.

Both tools use the same development framework, so most of the steps on this page can apply to both.

Let's see for instance how we could follow transfers of the PSG Fan Token...

## 0. Choose a tool

You can deploy a subgraph on Chiliz Chain using **The Graph** (decentralized network) or **Goldsky** (hosted indexer). The code structure is identical; only the deployment commands differ.

Of course, you can rely on their own docs:

{% embed url="<https://thegraph.com/docs/en/subgraphs/quick-start/>" %}

{% embed url="<https://docs.goldsky.com/subgraphs/deploying-subgraphs>" %}

## 1. Initialize a subgraph project

Both The Graph and Goldsky offer CLI-based methods to create your graph.

{% hint style="info" %}
The Graph has [Subgraph Studio](https://thegraph.com/studio/), which you can connect to using your Web3, then create a subgraph through the interface.

Goldsky gives you a [dashboard](https://app.goldsky.com/) when you create an account, from which you can create a subgraph.
{% endhint %}

### Install the Graph CLI⁠

On your local machine, run the following:

```bash
npm install -g @graphprotocol/graph-cli
```

{% hint style="info" %}
You can create a subgraph using the CLI tool from The Graph for either The Graph-decentralized subgraphs, or Goldsky-hosted subgraphs.

Goldsky has its own CLI tool, which you will need if you want to deploy on Goldsky (see below).
{% endhint %}

### Initialize your subgraph⁠

You can copy this directly from your subgraph page to include your specific subgraph slug:

```bash
graph init --studio <SUBGRAPH_SLUG>
```

The `--studio` tag is optional.

In our PSG Fan Token example, we can use:

```bash
graph init chiliz-psg-fantoken-followup
```

You’ll be prompted to provide some info on your subgraph, like this:

<figure><img src="/files/TVV2He4D2bKtusbnV0x4" alt=""><figcaption></figcaption></figure>

You need to have your contract verified on the block explorer, and the CLI will automatically obtain the ABI and set up your subgraph. The default settings will generate an entity for each event.

{% hint style="warning" %}
Note:

* If the contract uses a proxy, like the PSG Fan Token does, then use the implementation contract's address instead. You'll see it in the "Read/write contract" tab on the block explorer page of the contract. For instance, [see here for the PSG Fan token contract on Chiliz Block Explorer](https://scan.chiliz.com/token/0xc2661815C69c2B3924D3dd0c2C1358A1E38A3105?tab=read_write_contract).
  * If you had to enter a proxy's implementation contract address, then once the project is set up, go to the manifest file (`subgraph.yaml`) and change the contract address to the proxy's address.
* If the Start Block isn't automatically obtained, you can manually enter the block number where the contract was created. You can obtain this from the block explorer.
  {% endhint %}

{% hint style="info" %}
When making changes to your subgraph, you will mostly work with three files:

* The Manifest (`subgraph.yaml`): Defines what data sources your subgraph will index.
* The Schema (`schema.graphql`): Defines what data you wish to retrieve from the subgraph.
* AssemblyScript Mappings (`mapping.ts`): Translates data from your data sources to the entities defined in the schema.
  {% endhint %}

Open `subgraph.yaml` and make sur your manifest file points to the correct network:

```yaml
dataSources:
  - kind: ethereum
    name: FanToken
    network: chiliz  # Use 'chiliz' for Mainnet, chiliz-testnet for Spicy
    source:
      address: "0x..." 
      abi: FanToken
```

### Compile your subgraph

Finally, compile your subgraph to ensure that there are no errors:

```bash
graph codegen && graph build
```

## 2. Deploy & Publish

Once your subgraph is built, choose your provider to deploy it.

{% columns %}
{% column %}
**The Graph**

1. Connect to [Subgraph Studio](https://thegraph.com/studio/), create a subgraph, and copy your deploy key.
2. Authenticate through the CLI:\
   `graph auth --studio <DEPLOY_KEY>`
3. Deploy your subgraph to Subgraph Studio:\
   `graph deploy --studio <SUBGRAPH_SLUG>`
4. Go to Studio, open your subgraph and click "Publish" to mint your subgraph to the decentralized network.\
   It'll trigger a transaction through your wallet to publish your subgraph as an NFT on the Arbitrum One network.
   {% endcolumn %}

{% column %}
**Goldsky**

1. Go to [Goldsky](https://app.goldsky.com/), create an API key in "Project Settings", and log in via CLI.
2. Install the `goldsky` command:\
   `curl https://goldsky.com | sh`\
   Then authenticate through the CLI:\
   `goldsky login`
3. Upload your subgraph to Goldsky:\
   `goldsky subgraph deploy / --path`

Goldsky subgraphs are live immediately after deployment. No extra publishing step is required.
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
You will be asked for a version label. You can enter something like `v0.0.1`, but you’re free to choose the format. Once that's done, you'll see the subgraph start to sync in the Studio page.
{% endhint %}

{% hint style="info" %}
The Graph's smart contracts are all on [Arbitrum One](https://arbitrum.io/arbitrum-101), even though your subgraph is indexing data from Chiliz Chain.
{% endhint %}

## 3. Query your Subgraph

Congratulations! You can now start querying it by passing a GraphQL query into the subgraph’s query URL which can be found in the dashboard of your chosen service.

Example:

{% columns %}
{% column %}
**The Graph**

`https://gateway-arbitrum.network.thegraph.com/api/[APIKEY]/subgraphs/id/[ID]`
{% endcolumn %}

{% column %}
**Goldsky**

`https://api.goldsky.com/api/public/project_[KEY]/subgraphs/[SLUG]/1.0.0/gn`
{% endcolumn %}
{% endcolumns %}

Now, you simply need to fill in your details to start sending GraphQL queries to this endpoint.

## Appendices

### Sample Query

This query shows all transactions of the PSG Fan Token.

```typescript
const axios = require('axios');

// The GraphQL query (Identical for both providers)
const graphqlQuery = `{
  transfers {
    from
    to
    value
    transactionHash
  }
}`;

// Choose the right URL format depending on the provider:
// const queryUrl = 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/[id]'
// const queryUrl = 'https://api.goldsky.com/api/public/project_[key]/subgraphs/[slug]/1.0.0/gn';

const graphQLRequest = {
  method: 'post',
  url: queryUrl,
  data: {
    query: graphqlQuery,
  },
};

// Send the GraphQL query
axios(graphQLRequest)
  .then((response) => {
    // Handle the response here
    const data = response.data.data
    console.log(data)

  })
  .catch((error) => {
    // Handle any errors
    console.error(error);
  });
```

### Sample code

```json
{
  "data": {
    "transfers": [
      {
        "from": "0x26a3e78fa4d2cbebf6b59b2f84b8fb7c61b52d28",
        "to": "0xdca23d02923d01779fb22959bd2575d64eab4535",
        "value": "1500",
        "transactionHash": "0x000309e9cd3f550e8965381bbd83a35c5cee18f26c33a357f9dbb57450d594ea"
      },
//      ...
  }
}
```

Passing this into the query URL returns this result:

```json
{
  transfers {
    from
    to
    value
    transactionHash
  }
}
```

## Additional resources

For more information about querying data from your subgraph with GraphQL:

{% embed url="<https://thegraph.com/docs/en/subgraphs/querying/best-practices/>" %}


# Get Telegram notifications for Fan Token transfers

Set up a Telegram whale-watcher bot for Fan Token transfers using Envio's indexer, capturing transfer events on Chiliz Chain and triggering alerts on threshold breaches.

Monitoring the Fan Token™ transfers that happen on Chiliz Chain is a great way to stay informed about high-value moves and keep your community in the loop.

With a bit of configuration and code, you can set up a Telegram bot to notify a group whenever a Fan Token™ transfer surpasses a certain threshold.

## How to do it using Envio?

[Envio](https://envio.dev/) is a powerful indexing tool that allows developers to listen for smart contract events on Chiliz and perform an action based on the event.

In this how-to, you’ll see how to configure the bot, capture the relevant events, and automatically trigger Telegram alerts, thus turning your setup into a “whale watcher” for major transfers.

### Step 1: Install Prerequisites

Before we begin, ensure you have the [required tools](https://docs.envio.dev/docs/HyperIndex/getting-started#prerequisites) installed:

* [pnpm](https://pnpm.io/)
* [Node.js](https://nodejs.org/en)
* [Docker](https://www.docker.com/)

{% hint style="info" %}
The full project can be found [on this GitHub repository](https://github.com/DenhamPreen/fc-barce-fan-token-indexer/tree/main).
{% endhint %}

### Step 2: Initialize Envio Indexer

Run the following command to initialize an Envio indexer and follow the prompts to generate an ERC20 template on Chiliz Chain (which is an EVM-compatible blockchain):

```bash
pnpx envio init
```

Here are the various selections you should make when prompted:

<figure><img src="/files/cTcwna6ZZGBM2Lo9144z" alt=""><figcaption></figcaption></figure>

### Step 3: Configure `config.yaml`

Modify the `config.yaml` file to specify the contract address of the FC Barcelona Fan Token™ (or any other Fan Token™ you want to track):

{% code overflow="wrap" lineNumbers="true" %}

```yaml
# yaml-language-server: $schema=./node_modules/envio/evm.schema.json
name: fan-token-watcher
description: A simple indexer for Fan Tokens that posts notifications to Telegram on large transfers
networks:
  - id: 8888 # Chiliz
    start_block: 0
    contracts:
      - name: ERC20
        address: "0xFD3C73b3B09D418841dd6Aff341b2d6e3abA433b" # FC Barcelona
        handler: src/EventHandlers.ts
        events:          
          - event: "Transfer(address indexed from, address indexed to, uint256 value)"
field_selection:
  transaction_fields:
    - "hash"
```

{% endcode %}

**Note:** We remove the `approval` event as we are only interested in transfers.

### Step 4: Simplify the GraphQL Schema

Modify the `schema.graphql` file to track only account balances:

```graphql
type Account {
  id: ID!   # Address of the account
  balance: BigInt! # Account balance of tokens
}
```

At this point, we have an ERC20 indexer that listens for events.

Now, let’s add logic to post Telegram notifications.

### Step 5: Implement Telegram Notification Logic

Modify the `/src/EventHandlers.ts` file to include logic for detecting large transfers and sending Telegram alerts.

{% code overflow="wrap" lineNumbers="true" %}

```typescript
import { ERC20 } from "generated";
import { isIndexingAtHead, indexBalances } from "./libs/helpers";
import { fetchEnsHandle } from "./libs/ens";
import { sendMessageToTelegram } from "./libs/telegram";
import { WHALE_THRESHOLD, explorerUrlAddress, explorerUrlTx } from "./constants";

ERC20.Transfer.handler(async ({ event, context }) => {
  if (isIndexingAtHead(event.block.timestamp) && event.params.value >= BigInt(WHALE_THRESHOLD)) {
    const ensHandleOrFromAddress = await fetchEnsHandle(event.params.from); 
    const ensHandleOrToAddress = await fetchEnsHandle(event.params.to);
    const msg = `FC Barcelona WHALE ALERT 🐋: A new transfer has been made by <a href="${explorerUrlAddress(
      event.params.from
    )}">${ensHandleOrFromAddress}</a> to <a href="${explorerUrlAddress(
      event.params.to
    )}">${ensHandleOrToAddress}</a> for ${event.params.value} FC Barcelona! 🔥 - <a href="${explorerUrlTx(
      event.transaction.hash
    )}">transaction</a>`;

    await sendMessageToTelegram(msg);
  }

  await indexBalances(context, event);
});
```

{% endcode %}

{% hint style="success" %}
The sample `/libs/` folder can be found [right here on GitHub](https://github.com/DenhamPreen/fc-barce-fan-token-indexer/tree/main/src/libs), including the `helpers.ts` and `ens.ts` files.
{% endhint %}

### Step 6: Configure Constants

Create a `constants.ts` file to store environment variables:

{% code overflow="wrap" lineNumbers="true" %}

```typescript
export const EXPLORER_URL_MONAD = process.env.ENVIO_EXPLORER_URL_MONAD;
export const WHALE_THRESHOLD: string = process.env.ENVIO_WHALE_THRESHOLD ?? "1000";
export const BOT_TOKEN = process.env.ENVIO_BOT_TOKEN;
export const CHANNEL_ID = process.env.ENVIO_TELEGRAM_CHANNEL_ID;
export const MESSAGE_THREAD_ID = process.env.ENVIO_TELEGRAM_MESSAGE_THREAD_ID;

export const explorerUrlAddress = (address: string) =>
  EXPLORER_URL_MONAD + "address/" + address;
export const explorerUrlTx = (txHash: string) =>
  EXPLORER_URL_MONAD + "tx/" + txHash;
```

{% endcode %}

### Step 7: Sending Telegram Messages

Install the [Axios HTTP client](https://axios-http.com/):

```bash
pnpm i axios
```

Create a helper function in `libs/telegram.ts` to send messages using Axios:

{% code overflow="wrap" lineNumbers="true" %}

```typescript
import axios from "axios";
import { CHANNEL_ID, MESSAGE_THREAD_ID, BOT_TOKEN } from "../constants";

export const sendMessageToTelegram = async (message: string): Promise<void> => {
  try {
    const apiUrl = `https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`;
    await axios.post(apiUrl, {
      chat_id: CHANNEL_ID,
      text: message,
      parse_mode: "HTML",
    });
  } catch (error) {
    console.error("Error sending message:", error);
  }
};
```

{% endcode %}

### Step 8: Final Configuration and Running the Indexer

#### Configure `.env` File

```sh
cp .env.example .env
```

Edit `.env` with your Telegram bot credentials:

```sh
ENVIO_BOT_TOKEN=
ENVIO_TELEGRAM_CHANNEL_ID=
ENVIO_TELEGRAM_MESSAGE_THREAD_ID=
ENVIO_EXPLORER_URL="https://chiliscan.com/"
ENVIO_WHALE_THRESHOLD=1000
```

#### Create a Telegram Bot

1. Message `@BotFather` on Telegram and run:

   ```
   /newbot
   ```
2. Follow the prompts to get your bot token.
3. Add the bot to your Telegram group and run `/start`.
4. Visit `https://api.telegram.org/bot<YourBOTToken>/getUpdates` to find the group chat ID.

{% hint style="success" %}
If you created the new group with the bot and you only get `{"ok":true,"result":[]}`, remove and add the bot again to the group.
{% endhint %}

#### Finally, install dependencies and start the indexer

```sh
pnpm i
pnpm envio dev
```

With this setup, you now have an Envio-powered indexer that listens for Fan Token transfers and posts whale alerts to Telegram.

<figure><img src="/files/f8TwJ35nzjhkWtE3DURD" alt=""><figcaption></figcaption></figure>

To go further, you can self-host the indexer or deploy it to Envio’s hosted service.

And since we are saving the balances, it can be used as a GraphQL balance API too.


# Work with NFTs

End-to-end NFT guide for Chiliz Chain: choosing ERC-721 or ERC-1155 contracts, IPFS hosting, minting with viem/thirdweb/Rarible, and listing on OKX.

{% hint style="success" %}
**What is an NFT?**

As per Wikipedia, "A non-fungible token (NFT) is a unique digital identifier that is recorded on a blockchain and is used to certify ownership and authenticity. It cannot be copied, substituted, or subdivided. The ownership of an NFT is recorded in the blockchain and can be transferred by the owner, allowing NFTs to be sold and traded."

In effect, an NFT is made of:

* a media file (image, video) available online,
* its attached metadata file, which notably features the web address where the media file is stored,
* a blockchain's block, which stores the metadata file along with an NFT-centric smart contract that offers methods to interact with the NFT.

NFTs on Chiliz Chain follow the [EVM standards](https://ethereum.org/en/developers/docs/standards/) (for instance: [ERC721](https://ethereum.org/en/developers/docs/standards/tokens/erc-721/), [ERC-1155](https://ethereum.org/en/developers/docs/standards/tokens/erc-1155/), [etc.](https://ethereum.org/en/developers/docs/standards/#token-standards)), which ensure interoperability across tools and marketplaces.
{% endhint %}

{% hint style="success" %}
**What is NFT minting?**

NFT minting is the process of taking a digital file (such as an image, a video, or a piece of music) and turning it into an on-chain token: a verifiable digital asset that can be owned and transferred.
{% endhint %}

## Prerequisites

Three things are necessary for you to mint NFTs:

### 1. A Web3 wallet

To interact with Chiliz Chain (Chiliz Chain Mainnet or Spicy Testnet), you need a Web3 wallet address with some amount of CHZ on it. CHZ is the native Chiliz Chain token.

{% hint style="success" %}
A Web3 wallet serves as both storage for your CHZ tokens, and as your digital signature to approve on-chain actions.
{% endhint %}

You can use [MetaMask](https://metamask.io/) or any other Web3 wallet when working on Chiliz Chain:

{% content-ref url="/pages/7jmbvsuzJaARscErNwWb" %}
[How to use MetaMask](/learn/about-wallets/how-to-use-metamask)
{% endcontent-ref %}

Once installed, set your wallet up to work with Chiliz Chain:

{% content-ref url="/pages/oYKKHjOmAZJp2Vfye0kX" %}
[Connect using RPC](/develop/basics/connect-to-chiliz-chain/connect-using-rpc)
{% endcontent-ref %}

Make sure to obtain CHZ tokens in order to pay for gas fees on Chiliz Chain Mainnet. You can buy CHZ on any exchange such as Binance, Coinbase, Bitpanda, etc.

To test your ability to mint NFTs on Chiliz Chain, you should use the Spicy Testnet with test CHZ tokens. You can obtain free tokens through testnet faucets:

{% content-ref url="/pages/Af9548Yd4RQMNgtsUkq9" %}
[Obtain Free Testnet Tokens](/develop/basics/obtain-free-testnet-tokens)
{% endcontent-ref %}

### 2. A deployed NFT smart contract

Before a file can be minted into an NFT, you must deploy and verify a corresponding NFT smart contract on Chiliz Chain. This is a crucial step to ensure transparency and enable interaction with your contract on-chain.

{% content-ref url="/pages/6jKxG34DH2ynN0hV3uMS" %}
[Choosing the right NFT contract](/develop/advanced/work-with-nfts/choosing-the-right-nft-contract)
{% endcontent-ref %}

{% content-ref url="/pages/zTkQQLpwajpWEoLHUp1b" %}
[Deploy a Smart Contract](/develop/basics/deploy-a-smart-contract)
{% endcontent-ref %}

{% content-ref url="/pages/Lxl4NxqCWg16RmKF2Iln" %}
[Verify a Smart Contract](/develop/basics/verify-a-smart-contract)
{% endcontent-ref %}

### 3. An online location for your NFT files & metadata

One essential part of your NFT is to have it available online, for all to see. One way to do that it to have your media file (image/video/etc.) and its `metadata.json` file accessible via IPFS.

{% content-ref url="/pages/8a6dGcAkUeJ78Zd5WHWo" %}
[Preparing the NFT files](/develop/advanced/work-with-nfts/preparing-the-nft-files)
{% endcontent-ref %}

{% content-ref url="/pages/zkeWU5tiTSyRLD8MSwGQ" %}
[Hosting your NFT on IPFS](/develop/advanced/work-with-nfts/hosting-your-nft-on-ipfs)
{% endcontent-ref %}

## Minting an NFT

There are several ways to mint NFTs on Chiliz Chain, depending on your needs.\
These pages aim to present the most recommended ways.

{% content-ref url="/pages/UakaCFAvmCVmHRZHtyHV" %}
[Minting with viem](/develop/advanced/work-with-nfts/minting-with-viem)
{% endcontent-ref %}

{% content-ref url="/pages/0P3O7tKO9hT6EZsn0Bhy" %}
[Minting with thirdweb](/develop/advanced/work-with-nfts/minting-with-thirdweb)
{% endcontent-ref %}

{% content-ref url="/pages/0Qu6XGa5tuqtfztY0iPR" %}
[Minting with Rarible](/develop/advanced/work-with-nfts/minting-with-rarible)
{% endcontent-ref %}

## Listing an NFT for sale

For developers and creators, "hosting" an NFT effectively means listing your assets on an online NFT marketplace so they are visible, tradable, and indexed for users.

{% content-ref url="/pages/mNzsuAl836Ag0TWvyd2p" %}
[Listing your NFT on OKX](/develop/advanced/work-with-nfts/listing-your-nft-on-okx)
{% endcontent-ref %}


# Preparing the NFT files

Prepare visual assets and ERC-721/ERC-1155 metadata JSON files for NFT minting on Chiliz Chain, covering image formats and metadata schema standards.

Preparing the files for your NFT project involves two distinct parts:

* the visual asset (what the user sees)
* the metadata (what the blockchain reads)

## The visual assets

This is the art that you want to turn into NFTs.

You (or your design team) should produce the files with these specifications:

### Format

* Static images: Use PNG (preferred for quality) or JPG.
* Video: Use MP4.\
  \_If you have a video card, also create a static "thumbnail" image for smooth loading.\_
* 3D Objects: Use GLB or GLTF.

### Dimensions (Aspect Ratio)

Usually, NFTs use either:

* A square format: 1080 x 1080 pixels.
* A Vertical Phone/Story format: 1080 x 1920 pixels.

### File Size

Aim to keep the files under 25MB (ideally <10MB) for fast loading on mobile wallets.

{% hint style="info" %}

#### Pro Tip

Create a high-res "Master" file (100MB+) but do not use it as the main NFT image. Instead, use the "[Unlockable Content](https://help.rarible.com/hc/en-us/articles/10460251328653-What-is-unlockable-content)" feature to give the Master file only to the owner.
{% endhint %}

## The metadata

The blockchain does not store your image directly (it is too expensive). It stores a link to a text file in the JSON format, which means the JSON files can only be created once the visual files are effectively hosted.

{% hint style="info" %}
Most modern tooling will do this for you, saving you from having to do it all by hand.
{% endhint %}

There must be one JSON file for each NFT type in your collection (e.g., one JSON for "NFT 1", one for "NFT 2", etc.).

Here is an example of an NFT's JSON file:

```json
{
  "name": "Mark Whaleon - 2024/25 Season",
  "description": "The official Striker card for Team X, 2024/25 Season. Gold Tier.",
  "image": "ipfs://YOUR_IMAGE_IPFS_ID_GOES_HERE",
  "external_url": "https://example.com/players/whaleon",
  "attributes": [
    {
      "trait_type": "Position",
      "value": "Striker"
    },
    {
      "trait_type": "Jersey Number",
      "value": "10"
    },
    {
      "trait_type": "Season",
      "value": "2024/2025"
    },
    {
      "trait_type": "Rarity",
      "value": "Gold"
    },
    {
      "display_type": "number",
      "trait_type": "Goals Scored",
      "value": 15
    }
  ]
}
```

{% hint style="info" %}
The attributes are crucial for sports-related cards. It allows fans to filter by "Position," "Season," or "Rarity" on marketplaces.
{% endhint %}


# Choosing the right NFT contract

Choose between ERC-721 (unique collectibles) and ERC-1155 (multi-edition tokens) for NFT projects on Chiliz Chain, with notes on royalty and metadata update extensions.

Before a file can be minted into an NFT, you must deploy and verify a corresponding NFT smart contract on Chiliz Chain. This is a crucial step to ensure transparency and enable interaction with your contract on-chain.

## **Which smart contract to use?**

There are many smart contracts in the blockchain world, and it might not be obvious which one is suitable for NFT minting.

Which smart contract you need depends on what kind of NFT project you have in mind:

* One unique item:\
  Use an [ERC-721](https://eips.ethereum.org/EIPS/eip-721) NFT contract, and mint a single item with it.
* Many unique item:\
  Use an [ERC-721](https://eips.ethereum.org/EIPS/eip-721) NFT contract, and mint a collection of items with it.
* Several copies of the same item:\
  Use an [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) Multi Token contract (allows one item to have more than one instance).
* Several copies of several items:\
  Use an [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) Multi Token contract as well.

There are others smart contracts (known as contract extensions or variants) for different usages (such as [ERC-2981](https://eips.ethereum.org/EIPS/eip-2981) for Royalties, [ERC-4906](https://eips.ethereum.org/EIPS/eip-4906) for Metadata update event, ERC-721 Drop for lazy-minting, etc.), but for now, knowing about ERC-721/1155 is enough.

{% hint style="warning" %}
**Should I write my own smart contract?**

Even if you want to have full control on your code, we DO NOT recommend writing ERC‑721 contracts from scratch. You should use the battle‑tested and audited contracts from reputable contract libraries.
{% endhint %}

The most secure and common way to obtain a NFT-minting contract is by using the one from OpenZeppelin, for instance [their ERC-721 contract](https://docs.openzeppelin.com/contracts/5.x/erc721). This saves you from reinventing the wheel and helps prevent common security vulnerabilities.

{% hint style="success" %}
[OpenZeppelin](https://www.openzeppelin.com/) is an open-source platform for building secure dApps.

In addition to several security and auditing services, they provide [a library of community-vetted smart contracts](https://docs.openzeppelin.com/contracts/), free for anyone to use in their projects.

As such, OpenZeppelin contracts are considered industry standards, and you can safely rely on them.
{% endhint %}

## Deploying and Verifying your NFT Smart Contract

You can deploy your smart contract to Chiliz Chain using reputable platforms, such as [Remix IDE](https://remix.ethereum.org/) or [thirdweb](https://thirdweb.com/), or directly using [Hardhat](https://hardhat.org/).

Once you have deployed it, you must verify the contract on an block explorer, so that developer tools and platforms can read its ABI (Application Binary Interface) and interact with it.

Follow these guides to deploy then verify your NFT contract:

{% content-ref url="/pages/zTkQQLpwajpWEoLHUp1b" %}
[Deploy a Smart Contract](/develop/basics/deploy-a-smart-contract)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure to verify your contract on one of the Chiliz Chain block explorers!\
[Verify a Smart Contract](/develop/basics/verify-a-smart-contract)

Only verified contracts can mint NFTs that are compatible with Socios.com and the Socios.com Wallet.
{% endhint %}

Again, pay attention to use the correct network details for Chiliz Chain and Spicy Testnet:

{% content-ref url="/pages/oYKKHjOmAZJp2Vfye0kX" %}
[Connect using RPC](/develop/basics/connect-to-chiliz-chain/connect-using-rpc)
{% endcontent-ref %}


# Hosting your NFT on IPFS

Host NFT media files and metadata JSON on IPFS for permanent, decentralized tokenURI storage using Pinata or other IPFS providers for Chiliz Chain NFT projects.

If you don't know it yet, having an NFT does not mean that the NFT's file is uploaded as-is on the blockchain.\
Rather, an NFT corresponds to a blockchain block that contains a certain token. This token stores a "pointer" or link, called `tokenURI`, which contains the online address to a metadata file, which itself references the media file using another URI.

Because of the peer-to-peer nature of the blockchain, you cannot just host your NFT file and its metadata file on any web hosting service. Your `tokenURI` needs to stay permanent (or "immutable") and portable across apps and marketplaces, for as long as can be, possibly forever.

This is where IPFS enters the scene.

## **About IPFS**

[IPFS](https://ipfs.tech/), for InterPlanetary File System, is a decentralised file network which servers the purpose of hosting and sharing data across distributed networks. NFT platforms can fetch data from IPFS instead of relying on a single server, and the IPFS protocol makes it "feel" like all hosted files are local.

{% hint style="success" %}
**Do I need to learn about IPFS right now?**

It depends on your chosen method to mint your NFT:

* Using vanilla code (such as [viem](https://viem.sh/) or [ethers](https://ethers.org/)):\
  **Yes**, you need a valid `tokenURI` (e.g., `ipfs://.../metadata.json`) beforehand.
* Through a dashboard such as [thirdweb](https://thirdweb.com/):\
  **No**. Uploading to IPFS is built in. You can still paste an existing `ipfs://...` if you have one in the NFT parameters.
* Using most Web3 SDKs (such as [Rarible's Multichain SDK](https://docs.rarible.org/reference/getting-started)):\
  **Yes**, they will expect a URI. Some tools might help with uploads, but not most.
  {% endhint %}

The IPFS website has [an extensive page on NFT Storing best practices](https://docs.ipfs.tech/how-to/best-practices-for-nft-data/#types-of-ipfs-links-and-when-to-use-them).

## Details of NFT upload

When uploading your NFT, you need to perform two uploads to the Content Identifier (CID) that IPFS generates for you:

* The content itself, for which IPFS returns an IPFS URL for the hosted file.
* The metadata file, which references the CID of the media file, and must contain the IPFS URL for the file.

Both are to be uploaded on IPFS under the same CID.

Ideally, your toolset takes this in charge so that you don't have to do it all manually.

For information purpose, here is what a minimal `metadata.json` file would look like:

```json
{ 
    "name": "Stadium Pass #25456456", 
    "description": "PSG supporter entry ticket", 
    "image": "ipfs:///filename.png",           // for static images only!
    // "animation_url": "ipfs:///filename.mp4" // for video and audio files.
    "attributes": [
    { 
        "trait_type": "Tier", 
        "value": "Gold" 
    }] 
}
```

To learn more about NFT metadata structure (for instance, why you should use `image` for images and `animation_url` for videos), we advise you to read this document from OpenSea:

{% embed url="<https://docs.opensea.io/docs/metadata-standards#metadata-structure>" %}

Note: *You are not supposed to write the metadata file from scratch!*\
Your toolset should be able to generate it for you.

{% hint style="success" %}
You can either [run your own IPFS node](https://docs.ipfs.tech/how-to/command-line-quick-start/), or pay for an IPFS-host, such as [Pinata](https://pinata.cloud/), which offers a free pricing plan that might be enough for your needs.

Follow [Pinata's quick-start guide](https://docs.pinata.cloud/quickstart) in order to obtain your API credentials (consisting of an API key, an API secret, and a JWT token) and your Dedicated Gateway domain (for instance, `blue-genetic-quail-122.mypinata.cloud`).
{% endhint %}

As this documentation is not meant to describe everything about IPFS, we advise you to dive into the topic through online searches. You can start with this Pinata explainer:

{% embed url="<https://docs.pinata.cloud/ipfs-101/how-does-ipfs-work-with-nfts>" %}

... or this blogpost from thirdweb:

{% embed url="<https://blog.thirdweb.com/guides/securing-pinning-your-nft-with-ipfs/>" %}


# Minting with viem

Mint NFTs on Chiliz Chain programmatically using TypeScript with viem or ethers.js, a deployed ERC-721 contract on Remix, and Pinata for IPFS hosting.

For developers who prefer granular control over the minting process, you can use vanilla TypeScript with [viem](https://viem.sh/), a TypeScript interface for EVM-based projects. The [Ethers.js library](https://ethers.org/) is also a robust approach.

Going *vanilla* requires you to perform a bit more work than when relying on frameworks such as thirdweb. For instance, unless you run your own IPFS node, you will need to rely on an NFT storage platforms, which are for-pay.

{% hint style="success" %}
This example uses [Pinata](https://pinata.cloud/) as an IPFS host.\
You will also need to deploy an [OpenZeppelin ERC-721 contract](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol) on Chiliz Chain yourself. [Remix IDE](https://remix.ethereum.org/) gives you an in-browser IDE to do it. Don't forget to verify the contract using a block explorer!
{% endhint %}

Now, let's install `viem`, the `Pinata SDK`, and the `dotenv` module:

```bash
npm i viem pinata dotenv
```

Configure your `.env` file to work with your needs:

```
# Wallet / contract
PRIVATE_KEY=0xabc...                      # server-side only
CONTRACT_ADDRESS=0xYourErc721Address
RECIPIENT=0xRecipientOrLeaveEmpty         # optional; defaults to minter

# Pinata
PINATA_JWT=eyJhbGciOi...                  # JWT from Pinata dashboard
PINATA_GATEWAY=your-subdomain.mypinata.cloud

# Single mint
IMAGE_PATH=./art/image.png
NAME=My Chiliz NFT
DESCRIPTION=Minted on Chiliz with viem

# Batch mint
IMAGES_DIR=./art
NAME_PREFIX=My Chiliz NFT
BATCH_DESCRIPTION=Batch minted on Chiliz with viem
```

Now, let's dive into the code.\
\&#xNAN;*Take inspiration from it, don't use as-is!*

## Minting a single NFT

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```typescript
import 'dotenv/config';
import fs from 'fs';
import path from 'path';

import { createWalletClient, createPublicClient, http, parseEventLogs } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import type { Address } from 'viem';
import { chiliz, spicy } from 'viem/chains';
import { PinataSDK } from 'pinata';

// Minimal ABI: safeMint(to, uri) + tokenURI + Transfer
const abi = [
  { type: 'function', name: 'safeMint', stateMutability: 'nonpayable',
    inputs: [{ name: 'to', type: 'address' }, { name: 'uri', type: 'string' }], outputs: [] },
  { type: 'function', name: 'tokenURI', stateMutability: 'view',
    inputs: [{ name: 'tokenId', type: 'uint256' }], outputs: [{ type: 'string' }] },
  { type: 'event', name: 'Transfer',
    inputs: [
      { name: 'from', type: 'address', indexed: true },
      { name: 'to', type: 'address', indexed: true },
      { name: 'tokenId', type: 'uint256', indexed: true },
    ]},
] as const;

function guessMime(p: string) {
  const ext = path.extname(p).toLowerCase();
  if (ext === '.png') return 'image/png';
  if (ext === '.jpg' || ext === '.jpeg') return 'image/jpeg';
  if (ext === '.webp') return 'image/webp';
  if (ext === '.gif') return 'image/gif';
  if (ext === '.mp4') return 'video/mp4';
  if (ext === '.webm') return 'video/webm';
  return 'application/octet-stream';
}

async function main() {
  // Choose your network: use `spicy` for Spicy Testnet, switch to `chiliz` for Chiliz Chain Mainnet.
  const chain = spicy; // Change to `chiliz` for Mainnet

  const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
  const walletClient = createWalletClient({ account, chain, transport: http() });
  const publicClient = createPublicClient({ chain, transport: http() });

  const address = process.env.CONTRACT_ADDRESS as Address;
  const recipient = (process.env.RECIPIENT as Address) || account.address;

  // IPFS upload (Pinata)
  const pinata = new PinataSDK({
    pinataJwt: process.env.PINATA_JWT!,
    pinataGateway: process.env.PINATA_GATEWAY!,
  });

  const filePath = process.env.IMAGE_PATH!;
  const fileBlob = new Blob([fs.readFileSync(filePath)], { type: guessMime(filePath) });
  const fileObj = new File([fileBlob], path.basename(filePath), { type: guessMime(filePath) });

  const up = await pinata.upload.public.file(fileObj);
  const imageUri = `ipfs://${up.cid}`;

  const meta = await pinata.upload.public.json({
    name: process.env.NAME!,
    description: process.env.DESCRIPTION!,
    image: imageUri,
  });
  const metadataUri = `ipfs://${meta.cid}`;

  // Mint on-chain via viem
  const txHash = await walletClient.writeContract({
    address,
    abi,
    functionName: 'safeMint',
    args: [recipient, metadataUri],
  });

  const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });

  const ZERO = '0x0000000000000000000000000000000000000000';
  const logs = parseEventLogs({ abi, logs: receipt.logs, eventName: 'Transfer' });
  const mintLog = logs.find(l => (l.args as any).from?.toLowerCase?.() === ZERO);
  const tokenId = mintLog ? (mintLog.args as any).tokenId : undefined;

  console.log('tx:', txHash, '| tokenId:', tokenId ?? '(not parsed)', '| tokenURI:', metadataUri);
}

main().catch(err => (console.error(err), process.exit(1)));

```

{% endcode %}

## Minting a collection of NFTs

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```typescript
import 'dotenv/config';
import fs from 'fs';
import path from 'path';
// import { Blob } from 'buffer'; // Node 18: uncomment the next line to get Blob.

import { createWalletClient, createPublicClient, http, parseEventLogs } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import type { Address } from 'viem';
import { chiliz, spicy } from 'viem/chains';
import { PinataSDK } from 'pinata';

// Minimal ABI: safeMint(to, uri) + tokenURI + Transfer
const abi = [
  { type: 'function', name: 'safeMint', stateMutability: 'nonpayable',
    inputs: [{ name: 'to', type: 'address' }, { name: 'uri', type: 'string' }], outputs: [] },
  { type: 'function', name: 'tokenURI', stateMutability: 'view',
    inputs: [{ name: 'tokenId', type: 'uint256' }], outputs: [{ type: 'string' }] },
  { type: 'event', name: 'Transfer',
    inputs: [
      { name: 'from', type: 'address', indexed: true },
      { name: 'to', type: 'address', indexed: true },
      { name: 'tokenId', type: 'uint256', indexed: true },
    ]},
] as const;

function guessMime(p: string) {
  const ext = path.extname(p).toLowerCase();
  if (ext === '.png') return 'image/png';
  if (ext === '.jpg' || ext === '.jpeg') return 'image/jpeg';
  if (ext === '.webp') return 'image/webp';
  if (ext === '.gif') return 'image/gif';
  if (ext === '.mp4') return 'video/mp4';
  if (ext === '.webm') return 'video/webm';
  return 'application/octet-stream';
}

async function main() {
  // Choose your network: use `spicy` for Spicy Testnet, switch to `chiliz` for Mainnet.
  const chain = spicy; // Change to `chiliz` for Mainnet

  const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
  const walletClient = createWalletClient({ account, chain, transport: http() });
  const publicClient = createPublicClient({ chain, transport: http() });

  const address = process.env.CONTRACT_ADDRESS as Address;
  const recipient = (process.env.RECIPIENT as Address) || account.address;

  // IPFS upload (Pinata)
  const pinata = new PinataSDK({
    pinataJwt: process.env.PINATA_JWT!,
    pinataGateway: process.env.PINATA_GATEWAY!, // optional; not needed for ipfs:// URIs
  });

  const filePath = process.env.IMAGE_PATH!;
  const fileBlob = new Blob([fs.readFileSync(filePath)], { type: guessMime(filePath) });

  // Pass a Blob directly
  const up = await pinata.upload.public.file(fileBlob);
  const imageUri = `ipfs://${up.cid}`;

  const meta = await pinata.upload.public.json({
    name: process.env.NAME!,
    description: process.env.DESCRIPTION!,
    image: imageUri,
  });
  const metadataUri = `ipfs://${meta.cid}`;

  // Mint on-chain via viem
  const txHash = await walletClient.writeContract({
    address,
    abi,
    functionName: 'safeMint',
    args: [recipient, metadataUri],
  });

  const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });

  const ZERO = '0x0000000000000000000000000000000000000000';
  const logs = parseEventLogs({ abi, logs: receipt.logs, eventName: 'Transfer' });
  const mintLog = logs.find(l => (l.args as any).from?.toLowerCase?.() === ZERO);
  const tokenId = mintLog ? (mintLog.args as any).tokenId : undefined;

  console.log('tx:', txHash, '| tokenId:', tokenId ?? '(not parsed)', '| tokenURI:', metadataUri);
}

main().catch(err => (console.error(err), process.exit(1)));

```

{% endcode %}


# Minting with thirdweb

Mint NFTs on Chiliz Chain via thirdweb's dashboard (no-code) or SDK, with built-in IPFS upload, audited contracts, and one-click collection deployment.

[thirdweb](https://thirdweb.com/) is a platform that offers tools and infrastructure for building decentralized applications on multiple blockchain networks. It simplifies blockchain integration with SDKs, APIs, and pre-built components.

In the case of NFT minting, thirdweb offers a polished dashboard and IPFS upload along with its audited contracts and extensive SDKs.

## Minting a single NFT manually

If you just want to upload a single image and mint it, thirdweb offers a click-to-deploy interface.

First, create a thirdweb account using your Web3 wallet as the owner. This gives you access to your thirdweb dashboard.

From there, you can choose between two paths:

* Use their [TokenERC721](https://thirdweb.com/thirdweb.eth/TokenERC721) page and its "Deploy Now" button.
* Or use their dashboard's "Create Token" interface.

Let's explore each real quick in this page.\
The [thirdweb Developer Portal](https://portal.thirdweb.com/) will give you more information should you need it.

### Using the TokenERC721 page

1. Go to the [TokenERC721](https://thirdweb.com/thirdweb.eth/TokenERC721) page. This relies on their contract for creating an NFT Collection.
2. Click "Deploy Now" to access to contract deployment page.

<figure><img src="/files/ms3mPZOVE3VrBTH2zp4z" alt=""><figcaption></figcaption></figure>

3. Fill in the "Contract metadata" section:
   1. Upload the image that you want to represent your NFT collection (or just the image that you want to mint).
   2. Give it a unique name and a symbol/ticker to your collection.
   3. Give it a description.
4. thirdweb automatically fills the recipient addresses for "Primary Sales" and "Royalties", make sure to check that the Web3 addresses are indeed that of your wallet.
5. In the "Deploy Options", choose Chiliz Chain (or Chiliz Spicy Testnet if this is just a test) and click "Deploy Now":

<figure><img src="/files/KuXTIw7PtXTnEN8hhwgS" alt=""><figcaption></figcaption></figure>

6. thirdweb will start deploying the contract, triggered a confirmation modal from your Web3 wallet. Confirm it to finish deploying.\
   ![](/files/7aKxib916dkj9lG39Ftg)
7. Once done, click the "View Contract" button. You'll be taken to the contract's page on your thirdweb dashboard, with a checklist/progress bar:\
   ![](/files/DcSWc9vlNbyAdv5Qkndm)
8. As you can see from the checklist, for now all you've done is deploy a contract, you still need to actually mint the NFT. On the left column, click on the "NFTs" menu item to open a new page, which is for now empty:\
   ![](/files/52s2JaoyeN7ouWdZQseJ)
9. Click the "Mint" button and a side-panel opens with field for each attribute of your NFT. This is were you create the metadata for your NFT:\
   ![](/files/wuQCq6j66Idw2vpLQ8hj)
10. Fill in the various fields. You can create fields that are specific to your NFT collection, such as "Artist\_name" or "Type\_of\_work", and explore advanced options, but for this test you can keep it minimal: name, media file, description.
11. Click on the "Mint NFT" button at the bottom of the side-panel, and approve the transaction from your wallet.\
    ![](/files/0TYfmeWh6HXZruDIl0Ve)
12. thirdweb will then display the "NFTs" page, with your NFT now visible, attached to your NFT contract.

DONE! You have minted your NFT!

To check that it is indeed on Chiliz Chain, open [Chiliscan](https://www.chiliscan.com/) (or [its Testnet variant](https://testnet.chiliscan.com/) if you're using Spicy Testnet) and copy-paste the NFT's hash in the search field. It should straight away confirm that your contract is on the chain, and its "Inventory" tab should list your NFT with you (or at least your wallet's ID) as the owner.

<figure><img src="/files/H7evCHvyasjyOilAp3af" alt=""><figcaption></figcaption></figure>

If you minted your NFT on Chiliz Chain Mainnet, you should see it appear in your account on marketplaces such as [Rarible](https://rarible.com/) or [OKX](https://www.okx.com/), and from there, you can start selling it!

### Using the "Create Token" button

This is in fact a more straightforward way than the one above, and is a recent addition to thirdweb.

1. From any project folder in your thirdweb dashboard, click the "Tokens" option in the left sidebar:\
   ![](/files/zTKLZe9nqAR5UtkZaucl)
2. In the "Tokens" page that open, click the "Create Token" button on the right handside. A modal window open with 2 options, choose "Create NFT Collection".\
   ![](/files/x1M3KGrFX14wRUZLA07U)
3. This will take you to a step-by-step version of the [TokenERC721](https://thirdweb.com/thirdweb.eth/TokenERC721) deployment page (in effect, it will deployer an ERC-721 Drop contract). Fill in all the fields necessary for this contract, then press the "Next" button.
4. The next screen is about the NFT itself: upload the image and fill in the fields describing your image, then press the "Next" button.
5. thirdweb now displays a summary of the NFT collection that you are about to launch. Check that everything is correct then click the "Launch NFT Collection" button.
6. thirdweb takes charge of deploying the contract, minting the NFT, and setting the conditions, all in one shot. You will need to confirm three transactions through your Web3 wallet.\
   ![](/files/W6nliRY37PaF9a0GrMfX)
7. Once this is done, click the "View NFT" button, and you'll be taken back to your thirdweb dashboard, displaying the page specific to this contract, and its attached NFTs.

From there, you can check that it's indeed on the chain through a block explorer, or start selling your NFT through a marketplace.

## Minting a single NFT programmatically

Here is a code sample that using the [thirdweb v5 SDK](https://portal.thirdweb.com/references/typescript/v5), which uploads the media file to IPFS, generates the `metadata.json` file, then uploads it to IPFS too.

This will require you to have:

* An already-deployed ERC-721 contract on Chiliz Chain. In this case you should do it using thirdweb rather another tool.
* A thirdweb API key, tied to the ERC-721 contract that you deployed through thirdweb. You can find it in the project page of the smart contract, under the name "Client ID".
* A local installation of the thirdweb SDK. You can do it using `npm`:

```bash
npm install thirdweb dotenv
```

The `dotenv` parameter generates an `.env` file, which is necessary to store private values:

```
THIRDWEB_SECRET_KEY=YOUR_TW_SECRET_KEY # From your thirdweb project's page.
PRIVATE_KEY=0xabc...                   # The Web3 wallet that will send the transaction.
CONTRACT_ADDRESS=0xYour721Address      # Your deployed TokenERC721 contract.
CHAIN_ID=88882                         # 88888=Mainnet, 88882=Spicy
IMAGE_PATH=./art/image.png             # The local path to your media file.
NAME=My Chiliz NFT
DESCRIPTION=Minted on Chiliz Chain
```

{% hint style="danger" %}
Never expose your `PRIVATE_KEY` nor `THIRDWEB_SECRET_KEY` in client-side code!\
Keep this file on a secure server/CI, and don't upload it on a public repositoryç
{% endhint %}

Now that you're all set, you can take inspiration from this script, which will:

1. Upload the media file to IPFS
2. Build and upload the `metadata.json` file
3. Mint the NFT using the contract's mintTo method.
4. Display the resulting `tokenId` and `tokenUrl` to you.

{% hint style="success" %}
This is just a sample code, you will need to adapt it to your own project code!
{% endhint %}

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```typescript
import 'dotenv/config';
import fs from 'fs';
import path from 'path';

import { createThirdwebClient, getContract, sendTransaction, waitForReceipt, parseEventLogs } from "thirdweb";
import { defineChain } from "thirdweb/chains";
import { privateKeyToAccount } from "thirdweb/wallets";
import { mintTo, transferEvent, getNFT } from "thirdweb/extensions/erc721";
import { upload } from "thirdweb/storage";

function guessMime(p: string) {
  const ext = path.extname(p).toLowerCase();
  if (ext === ".png") return "image/png";
  if (ext === ".jpg" || ext === ".jpeg") return "image/jpeg";
  if (ext === ".webp") return "image/webp";
  if (ext === ".gif") return "image/gif";
  if (ext === ".mp4") return "video/mp4";
  if (ext === ".webm") return "video/webm";
  return "application/octet-stream";
}

async function main() {
  const client = createThirdwebClient({ secretKey: process.env.THIRDWEB_SECRET_KEY! });
  const chain = defineChain(Number(process.env.CHAIN_ID)); // 88888 or 88882
  const account = privateKeyToAccount({ client, privateKey: process.env.PRIVATE_KEY! });

  const contract = getContract({
    client,
    chain,
    address: process.env.CONTRACT_ADDRESS as `0x${string}`,
  });

  // Upload media file to IPFS
  const filePath = process.env.IMAGE_PATH!;
  const buffer = fs.readFileSync(filePath);
  const file = new File([buffer], path.basename(filePath), { type: guessMime(filePath) });

  const [imageUri] = await upload({ client, files: [file] }); // returns ipfs://... 
  // console.log("imageUri:", imageUri);

  // Build & upload metadata.json referencing IPFS imageUri
  const metadata = {
    name: process.env.NAME!,
    description: process.env.DESCRIPTION!,
    image: imageUri
  };
  const metaBlob = new Blob([JSON.stringify(metadata, null, 2)], { type: "application/json" });
  const metaFile = new File([metaBlob], "metadata.json", { type: "application/json" });

  const [metadataUri] = await upload({ client, files: [metaFile] });
  // console.log("metadataUri:", metadataUri);

  // Prepare & send mintTo transaction using the metadata URI
  // mintTo accepts a string to use directly as tokenURI.
  const tx = mintTo({
    contract,
    to: account.address,
    nft: metadataUri, // The tokenURI
  });

  const { transactionHash } = await sendTransaction({ transaction: tx, account });
  //console.log("tx:", transactionHash);

  const receipt = await waitForReceipt({ client, chain, transactionHash });

  // Parse Transfer event to display tokenId
  const events = parseEventLogs({ logs: receipt.logs, events: [transferEvent()] });
  const minted = events.find(e => e.eventName === "Transfer" && e.args.from === "0x0000000000000000000000000000000000000000");
  const tokenId = minted ? (minted.args.tokenId as bigint) : undefined;
  //console.log("tokenId:", tokenId?.toString() ?? "(not found)");

  if (tokenId !== undefined) {
    const nft = await getNFT({ contract, tokenId });
    //console.log("tokenURI (read back):", nft.tokenURI);
  }
}

main().catch((err) => (console.error(err), process.exit(1)));
```

{% endcode %}

The important parts to take inspiration from are:

* `upload` stores files (and JSON) to IPFS and returns `ipfs://…` URIs.
* `mintTo` accepts a string to use directly as `tokenURI`.
* We parse the standard ERC-721 `Transfer` event to read the minted `tokenId`.

## Minting a collection of NFTs programmatically

Minting a collection of NFTs is not that different from minting a single one. The most notable difference is that your `.env` file points to the folder that contains all the images using `IMAGE_DIR`, rather than on a single image with `IMAGE_PATH`.

```dotenv
THIRDWEB_SECRET_KEY=YOUR_TW_SECRET_KEY # From your thirdweb project's page.
PRIVATE_KEY=0xabc...                   # The Web3 wallet that will send the transaction.
CONTRACT_ADDRESS=0xYour721Address      # Your deployed TokenERC721 contract.
CHAIN_ID=88882                         # 88888=Mainnet, 88882=Spicy
IMAGE_PATH=./art                       # The local path to your media files.
NAME_PREFIX=My Chiliz NFT              # This will become: "My Chiliz NFT <n>"
DESCRIPTION=Minted on Chiliz Chain
```

The sample code that we represents here therefore takes this into account:

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```typescript
import 'dotenv/config';
import fs from 'fs';
import path from 'path';

import { createThirdwebClient, getContract, sendTransaction, waitForReceipt, parseEventLogs } from "thirdweb";
import { defineChain } from "thirdweb/chains";
import { privateKeyToAccount } from "thirdweb/wallets";
import { mintTo, transferEvent, getNFT } from "thirdweb/extensions/erc721";
import { upload } from "thirdweb/storage";

function guessMime(p: string) {
  const ext = path.extname(p).toLowerCase();
  if (ext === ".png") return "image/png";
  if (ext === ".jpg" || ext === ".jpeg") return "image/jpeg";
  if (ext === ".webp") return "image/webp";
  if (ext === ".gif") return "image/gif";
  if (ext === ".mp4") return "video/mp4";
  if (ext === ".webm") return "video/webm";
  return "application/octet-stream";
}

// One way to gather all files
function listMediaFiles(dir: string) {
  const allow = new Set([".png", ".jpg", ".jpeg", ".webp", ".gif", ".mp4", ".webm", ".svg"]);
  return fs
    .readdirSync(dir)
    .filter((f) => allow.has(path.extname(f).toLowerCase()))
    .map((f) => path.join(dir, f));
}

async function main() {
  const client = createThirdwebClient({ secretKey: process.env.THIRDWEB_SECRET_KEY! });
  const chain = defineChain(Number(process.env.CHAIN_ID)); // 88888 or 88882
  const account = privateKeyToAccount({ client, privateKey: process.env.PRIVATE_KEY! }); 

  const contract = getContract({
    client,
    chain,
    address: process.env.CONTRACT_ADDRESS as `0x${string}`,
  });

  // Upload media files in a folder to IPFS
  const dirPath = process.env.IMAGES_DIR!;
  const filePaths = listMediaFiles(dirPath);
  if (!filePaths.length) {
    throw new Error(`No media files found in ${dirPath}`);
  }

  const fileObjs = filePaths.map((p) => {
    const buffer = fs.readFileSync(p);
    return new File([buffer], path.basename(p), { type: guessMime(p) });
  });

  const imageUris = await upload({ client, files: fileObjs }); // returns ["ipfs://...", ...]
  //console.log("Uploaded images to IPFS:", imageUris.length, "files");

  // Build & upload each metadata.json referencing its imageUri
  // Uses NAME and DESCRIPTION envs; names become "<NAME> #<index>"
  const namePrefix = process.env.NAME!;
  const description = process.env.DESCRIPTION!;

  // Create an array of File objects for metadata JSONs
  const metaFiles = imageUris.map((imageUri, i) => {
    const metadata = {
      name: `${namePrefix} #${i + 1}`,
      description,
      image: imageUri
    };
    const metaBlob = new Blob([JSON.stringify(metadata, null, 2)], { type: "application/json" });
    return new File([metaBlob], `metadata-${i + 1}.json`, { type: "application/json" });
  });

  const metadataUris = await upload({ client, files: metaFiles }); // ["ipfs://.../metadata-1.json", ...]
  //console.log("Uploaded metadata files to IPFS:", metadataUris.length);

  // Prepare & send mintTo transactions using the metadata URIs (sequential)
  const ZERO = "0x0000000000000000000000000000000000000000";

  for (let i = 0; i < metadataUris.length; i++) {
    const metadataUri = metadataUris[i];

    const tx = mintTo({
      contract,
      to: account.address,
      nft: metadataUri, // The tokenURI
    });

    const { transactionHash } = await sendTransaction({ transaction: tx, account });
    console.log(`[${i + 1}/${metadataUris.length}] tx:`, transactionHash);

    const receipt = await waitForReceipt({ client, chain, transactionHash });

    // Parse Transfer event to get tokenId for this mint
    const events = parseEventLogs({ logs: receipt.logs, events: [transferEvent()] });
    const minted = events.find(
      (e) => e.eventName === "Transfer" && typeof e.args.from === "string" && e.args.from.toLowerCase() === ZERO
    );
    const tokenId = minted ? (minted.args.tokenId as bigint) : undefined;

    // console.log(`[${i + 1}/${metadataUris.length}] tokenId:`, tokenId?.toString() ?? "(not found)");
    if (tokenId !== undefined) {
      const nft = await getNFT({ contract, tokenId });
      // console.log(`[${i + 1}/${metadataUris.length}] tokenURI (read back):`, nft.tokenURI);
    }
  }
}

main().catch((err) => (console.error(err), process.exit(1)));

```

{% endcode %}

The detailed changes are:

* `IMAGES_DIR` replaces `IMAGE_PATH`.
* Added `listMediaFiles` to gather multiple inputs.
* Batched `upload` for images and for metadata (keeps order).
* Loop to `mintTo` each `metadataUri`, parsing each `Transfer` event for its `tokenId`.
* Names are auto-numbered: `NAME #1`, `NAME #2`, … using your existing `NAME`/`DESCRIPTION`.

Again, please use this as an inspiration for your own code, do not use as-is!

Note: If you prefer to do lazy minting, thirdweb's ERC-721 contract has [a `lazyMint` method](https://portal.thirdweb.com/references/typescript/v5/erc721/lazyMint).




---

[Next Page](/llms-full.txt/1)

