Chiliz Chain Deep Dive – Why Construct on Chiliz Chain? – Moralis Web3


In immediately’s article, we’ll discover the advantages of Chiliz to elucidate why you may wish to construct on this community. Along with this, we’ll introduce Moralis, the {industry}’s main Web3 knowledge supplier. With our Chiliz-compatible APIs, now you can seamlessly fetch and combine on-chain knowledge into your dapps. In case you’re desirous to find out how this works, right here’s an instance exhibiting you easy methods to get a pockets’s full historical past with only one API name: 

import fetch from 'node-fetch';

const choices = {
  methodology: 'GET',
  headers: {
    settle for: 'software/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.builders.moralis.com/api/v2.2/wallets/0xf977814e90da44bfa03b6295a0616a897441acec/historical past?chain=0x15b38', choices)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));

In return for calling the script above, you’ll get the pockets’s full historical past, enriched with human-readable transaction summaries, class tags, and way more. Right here’s a pattern response: 

{
  //...
  "outcome": [
    {
      "hash": "0x0ea1e72d074cc7835d7f76014102bdd230257657d1cc9e57ad1701ce37d37c58",
      "nonce": "73645",
      "transaction_index": "0",
      "from_address_entity": null,
      "from_address_entity_logo": null,
      "from_address": "0x87917d879ba83ce3ada6e02d49a10c1ec1988062",
      "from_address_label": null,
      "to_address_entity": null,
      "to_address_entity_logo": null,
      "to_address": "0xa6610b3361c4c0d206aa3364cd985016c2d89386",
      "to_address_label": null,
      "value": "0",
      "gas": "47867",
      "gas_price": "5000000000000",
      "receipt_cumulative_gas_used": "47615",
      "receipt_gas_used": "47615",
      "receipt_contract_address": null,
      "receipt_status": "1",
      "block_timestamp": "2024-09-09T07:01:17.000Z",
      "block_number": "16386933",
      "block_hash": "0xb7d25de19e5eb2ddefec0bfce6d637dd49a8ab18a564e77f7434e0c691e2ab27",
      "transaction_fee": "0.238075",
      "method_label": "transfer",
      "nft_transfers": [],
      "erc20_transfers": [
        {
          "token_name": "AS Roma",
          "token_symbol": "ASR",
          "token_logo": null,
          "token_decimals": "0",
          "from_address_entity": null,
          "from_address_entity_logo": null,
          "from_address": "0x87917d879ba83ce3ada6e02d49a10c1ec1988062",
          "from_address_label": null,
          "to_address_entity": null,
          "to_address_entity_logo": null,
          "to_address": "0xf977814e90da44bfa03b6295a0616a897441acec",
          "to_address_label": null,
          "address": "0xa6610b3361c4c0d206aa3364cd985016c2d89386",
          "log_index": 0,
          "value": "77303",
          "possible_spam": false,
          "verified_contract": true,
          "security_score": null,
          "direction": "receive",
          "value_formatted": "77303"
        }
      ],
      "native_transfers": [],
      "abstract": "Acquired 77,303 ASR from 0x87...8062",
      "possible_spam": false,
      "class": "token obtain"
    },
    //...
  }
}

That’s it; fetching on-chain knowledge from Chiliz doesn’t should be tougher than this when utilizing Moralis. To be taught extra about how this works, be part of us on this information as we lay all of it out for you. 

Additionally, when you’d like to make use of our Chiliz-compatible Web3 APIs your self, then take this chance to enroll in free with Moralis! 

Overview

Ethereum is at the moment the largest blockchain for decentralized software (dapp) improvement. Nevertheless, for the reason that inception of Ethereum, we’ve seen a number of layer-1 and layer-2 blockchain networks emerge, every tailor-made for particular use instances. One such instance is Chiliz – a number one chain for main leisure and sports activities manufacturers. However what precisely is Chiliz? How does it work? And why must you construct on Chiliz Chain? In case you’re searching for the solutions to those questions, be part of us on this article. Let’s go!

What’s Chiliz Chain? And Why Construct on Chiliz?

The latest iteration of Chiliz launched again in 2023, and it’s an EVM-compatible layer-1 (L1) blockchain community specializing in the sports activities and leisure {industry}! 

Chiliz Chain

The imaginative and prescient behind Chiliz Chain is to determine a robust basis for a number one Web3 sports activities and leisure ecosystem, with fan experiences and B2C/B2B instruments at its core. In doing so, Chiliz goals to develop into the industry-leading platform for main leisure manufacturers and enterprise-level sports activities.

Chiliz makes use of a proof-of-staked authority (PoSA) consensus mechanism and operates with eleven validators. This PoSA consensus permits Chiliz to ship shorter block finality and low charges.

Furthermore, Chiliz Chain has a local token referred to as CHZ ($CHZ), which capabilities equally to how ETH operates on Ethereum. As such, the CHZ token can be utilized to pay for fuel, take part in staking practices, and way more. 

Now, with an outline of Chiliz, let’s dive into a couple of explanation why it’s best to construct on this chain!

Why Construct on Chiliz?

There are a lot of explanation why it’s best to construct on Chiliz. Listed here are 5 outstanding examples:

  • Seamless Developer Expertise: Chiliz Chain is EVM-compatible, which means you’ll be able to leverage instruments you’re aware of to construct on the community. This additionally means you’ll be able to seamlessly migrate present tasks from Ethereum to Chiliz with minor configurations.
  • Quick Transaction Processing: The PoSA consensus mechanism combines the perfect of proof-of-authority (PoA) and proof-of-stake (PoS) to facilitate quicker block instances and transaction processing.
  • Low Charges: Chiliz Chain options low transaction charges, making it a useful platform for each builders and end-users alike.
  • Passionate Fanbase: Attain tens of millions of followers throughout greater than 70 main leisure and sports activities manufacturers, prepared to make use of your dapps.
  • Thriving Developer Group: Collaborate with different builders in an interesting setting supported by improvement grants and ongoing fuel charge repurposing. 

The Chiliz Ecosystem

So, what does the present Chiliz ecosystem appear to be by way of numbers? 

  • 2+ million ecosystem customers. 
  • A market cap exceeding $1 billion. 
  • 82+ fan tokens. 
  • 150+ international sports activities companions, together with Manchester Metropolis, FC Barcelona, and lots of others. 

Exploring Socios

Socios is a well known service that gives sports activities organizations with modern methods to construct relationships with supporters through fan tokens. Fan tokens are digital belongings giving customers entry to experiences, the fitting to vote in polls, and develop into half of a big, international neighborhood of like-minded followers! 

Socios Chiliz Ecosystem

Socios is constructed on Chiliz Chain, and the platform leverages the community’s native token as its official forex. Moreover, Socios delivers a number of options, together with a market to swap tokens and Token Hunt – a preferred AR expertise the place customers can accumulate free tokens hidden of their metropolis. 

Socios is actively partnering with over 170 established sports activities organizations, together with soccer groups, Formulation One groups, and giants from the MLS, NBA, and NFL. 

In essence, Socios is a fan engagement platform that provides sports activities organizations a venue to construct and keep relationships with their followers and supporters! 

Now that we’ve familiarized ourselves with the ecosystem, you’ll doubtless additionally wish to create Chiliz Chain dapps your self. If so, be part of us within the subsequent part as we introduce Moralis – the {industry}’s main Web3 knowledge supplier! 

Introducing Moralis – The Final Chiliz API Supplier

The simplest technique to construct dapps on Chiliz Chain is to leverage Moralis – the {industry}’s main Web3 knowledge supplier. In our suite of premier APIs, you’ll discover Chiliz-compatible interfaces just like the Token API, Streams API, Pockets API, NFT API, Value API, and lots of others. As such, when leveraging Moralis, you get all crypto knowledge in a single single place! 

Moralis x Chiliz.

Why Construct on Chiliz with Moralis?

Moralis’ Web3 APIs are industry-leading for quite a few causes. Listed here are three key advantages highlighting why it’s best to construct on Chiliz with Moralis: 

  • Complete: Moralis’ Web3 APIs present the {industry}’s most complete responses, supplying you with extra knowledge with fewer calls. Get any pockets’s transaction historical past, token costs, up-to-date NFT metadata, and way more with single strains of code.  
  • Reliability & Safety: We guarantee excessive reliability and enterprise-grade safety, backed by our SOC 2 Kind 2 certification.
  • Cross-Chain: With full cross-chain compatibility, you’ll be able to construct dapps throughout all main chains, together with Chiliz, Ethereum, Optimism, Polygon, Base, and lots of extra.

Now, to additional spotlight the advantages of Moralis and clarify why it’s best to use our instruments to construct on Chiliz, let’s dive deeper into our Web3 APIs! 

Exploring Moralis’ Web3 APIs

Our Chiliz-compatible Web3 API suite contains a number of use case-specific APIs. Within the following sections, we’ll have a look at three of them:

  • Pockets API
  • Token API
  • Blockchain API

Let’s kick issues off with the Pockets API!

Pockets API

Moralis’ Pockets API is the {industry}’s #1 answer for anybody seeking to construct wallets or combine pockets performance into dapps. The Pockets API helps 500+ million addresses throughout all main chains, together with Chiliz, Ethereum, Optimism, Base, and lots of extra. 

Moralis Wallet API.

With the Pockets API, you solely want single strains of code to effortlessly fetch a pockets’s full transaction historical past, token balances, NFT balances, and way more. As such, when leveraging Moralis, you’ll be able to combine pockets knowledge into your Chiliz tasks with out breaking a sweat. 

To focus on the accessibility of the Pockets API, right here’s a pattern script exhibiting you ways straightforward it’s to fetch the total transaction historical past of a pockets: 

import fetch from 'node-fetch';

const choices = {
  methodology: 'GET',
  headers: {
    settle for: 'software/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.builders.moralis.com/api/v2.2/wallets/0xf977814e90da44bfa03b6295a0616a897441acec/historical past?chain=0x15b38', choices)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));

In return for calling the endpoint above, you’ll get the total transaction historical past of the required pockets. What’s extra, the response is enriched with human-readable summaries, classes, and way more for every transaction. Right here’s a pattern response: 

{
  //...
  "outcome": [
    {
      "hash": "0x0ea1e72d074cc7835d7f76014102bdd230257657d1cc9e57ad1701ce37d37c58",
      "nonce": "73645",
      "transaction_index": "0",
      "from_address_entity": null,
      "from_address_entity_logo": null,
      "from_address": "0x87917d879ba83ce3ada6e02d49a10c1ec1988062",
      "from_address_label": null,
      "to_address_entity": null,
      "to_address_entity_logo": null,
      "to_address": "0xa6610b3361c4c0d206aa3364cd985016c2d89386",
      "to_address_label": null,
      "value": "0",
      "gas": "47867",
      "gas_price": "5000000000000",
      "receipt_cumulative_gas_used": "47615",
      "receipt_gas_used": "47615",
      "receipt_contract_address": null,
      "receipt_status": "1",
      "block_timestamp": "2024-09-09T07:01:17.000Z",
      "block_number": "16386933",
      "block_hash": "0xb7d25de19e5eb2ddefec0bfce6d637dd49a8ab18a564e77f7434e0c691e2ab27",
      "transaction_fee": "0.238075",
      "method_label": "transfer",
      "nft_transfers": [],
      "erc20_transfers": [
        {
          "token_name": "AS Roma",
          "token_symbol": "ASR",
          "token_logo": null,
          "token_decimals": "0",
          "from_address_entity": null,
          "from_address_entity_logo": null,
          "from_address": "0x87917d879ba83ce3ada6e02d49a10c1ec1988062",
          "from_address_label": null,
          "to_address_entity": null,
          "to_address_entity_logo": null,
          "to_address": "0xf977814e90da44bfa03b6295a0616a897441acec",
          "to_address_label": null,
          "address": "0xa6610b3361c4c0d206aa3364cd985016c2d89386",
          "log_index": 0,
          "value": "77303",
          "possible_spam": false,
          "verified_contract": true,
          "security_score": null,
          "direction": "receive",
          "value_formatted": "77303"
        }
      ],
      "native_transfers": [],
      "abstract": "Acquired 77,303 ASR from 0x87...8062",
      "possible_spam": false,
      "class": "token obtain"
    },
    //...
  }
}

Token API

Our Token API is the final word device for ERC-20 knowledge, supporting each single token throughout all main chains. This consists of every little thing from stablecoins like USDC to meme cash like Shiba Inu. 

Token API.

With the Token API, you’ll be able to seamlessly get token balances, metadata, house owners, and way more. As such, the Token API is the proper device for anybody seeking to construct token analytics platforms, token explorers, and different comparable tasks. 

To focus on the ability of the Token API, take a look at the script beneath for fetching the token balances of a pockets: 

import fetch from 'node-fetch';

const choices = {
  methodology: 'GET',
  headers: {
    settle for: 'software/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.builders.moralis.com/api/v2.2/0xf977814e90da44bfa03b6295a0616a897441acec/erc20?chain=0x15b38', choices)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));

In return for working the code above, you’ll get the required pockets’s token balances. Right here’s an instance of what the response may appear to be: 

[
  {
    token_address: '0x454038003a93cf44766af352f74bad6b745616d0',
    symbol: 'JUV',
    name: 'Juventus',
    logo: null,
    thumbnail: null,
    decimals: 0,
    balance: '2162051',
    possible_spam: false,
    verified_contract: true,
    total_supply: '19956000',
    total_supply_formatted: '19956000',
    percentage_relative_to_total_supply: 10.83408999799559,
    security_score: null
  },
  //...
]

Blockchain API

Moralis’ Blockchain API is the proper device for fetching blockchain-related knowledge. With this industry-leading interface, you’ll be able to simply fetch and combine block knowledge, contract logs, transactions, and extra into your Chiliz tasks. As such, the Blockchain API is the final word device for anybody seeking to construct block explorers and different comparable platforms.

Blockchain API

To focus on the accessibility of the Blockchain API, right here’s a brief script on easy methods to get the contents of a block by its hash or quantity: 

import fetch from 'node-fetch';

const choices = {
  methodology: 'GET',
  headers: {
    settle for: 'software/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.builders.moralis.com/api/v2.2/block/2223?chain=0x15b38', choices)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));

In return for working the script above, you’ll get the block’s timestamp, hash, quantity, log blooms, fuel restrict, and way more. Right here’s a pattern response: 

{
  "timestamp": "2023-02-08T09:59:39.000Z",
  "quantity": "2223",
  "hash": "0xdb0a5c1d425613467332e6c72fe767655881ee34c0fa249ede12dcbd7108b573",
  "parent_hash": "0xdbb70c187799812faba5ffabc8dfe7acbcdb0d1509a5ee9beb347f933c137530",
  "nonce": "0x0000000000000000",
  "sha3_uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  "logs_bloom": "//...",
  "transactions_root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  "state_root": "0x0141d3e37fe45ab505fd139dc96ecccfb64aec1cb85ee9f86cf19ad0a7e64bdd",
  "receipts_root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  "miner": "0x39a7179B6c73622B63B8b58b973835e00E9d38b4",
  "problem": "2",
  "total_difficulty": "4447",
  "dimension": "609",
  "extra_data": "0xd983010108846765746889676f312e31362e3135856c696e75780000bd7c1b1b8668a896f4b724979968dc8b39e0b1e649b6f411896866979b26d88a104488b026a55dd4f2e4efc5afebf6ebdbbce96041c7b659f5e55303920e66bb7775fa2200",
  "gas_limit": "30000000",
  "gas_used": "0",
  "transaction_count": "0",
  "base_fee_per_gas": "0",
  "transactions": []
}

In case you’d wish to discover all our interfaces, please go to the Web3 API web page! 

3-Step Tutorial: Find out how to Get On-Chain Knowledge from Chiliz with Moralis

We’ll now additional spotlight why it’s best to construct on Chiliz utilizing Moralis. To take action, we’ll present you ways straightforward it’s to fetch a pockets’s full historical past in three easy steps: 

  1. Signal Up with Moralis & Get an API Key
  2. Write a Script
  3. Run the Code

Nevertheless, earlier than you’ll be able to proceed, you must take care of a couple of stipulations! 

Stipulations

Earlier than you can begin the tutorial, be sure to have the next prepared:

Step 1: Signal Up with Moralis & Get an API Key

Click on the ”Begin for Free” button on the high proper to enroll with Moralis:

Arrow pointing at "Start for Free" button top right.

As soon as logged in, you will discover your API key underneath the ”Residence” tab:

Arrow pointing at copy button for API key.

Copy and save the important thing for now; you’ll want it within the subsequent step.

Step 2: Write a Script

Open a code editor like VSC, arrange a brand new folder, and initialize a mission utilizing this terminal command: 

npm init

Set up the required dependencies by working the terminal instructions beneath in your mission’s root folder:

npm set up node-fetch --save
npm set up moralis @moralisweb3/common-evm-utils

Open your ”package deal.json” file and add ”sort”: ”module” to the listing: 

"type": "module" highlighted in code editor.

Create a brand new ”index.js” file and add the next script: 

import fetch from 'node-fetch';

const choices = {
  methodology: 'GET',
  headers: {
    settle for: 'software/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.builders.moralis.com/api/v2.2/wallets/0xf977814e90da44bfa03b6295a0616a897441acec/historical past?chain=0x15b38', choices)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));

From right here, exchange YOUR_API_KEY with the important thing you copied throughout step one: 

Arrow pointing at YOUR_API_KEY.

Subsequent, configure the deal with parameter to suit your question: 

Arrow pointing at address parameter.

Step 3: Run the Code

To run the code, execute the next command in your mission’s root folder: 

node index.js

In return, you’ll get the total historical past of the required pockets, enriched with transaction summaries, classes, and way more. Right here’s an instance of what it would appear to be: 

{
  //...
  "outcome": [
    {
      "hash": "0x0ea1e72d074cc7835d7f76014102bdd230257657d1cc9e57ad1701ce37d37c58",
      "nonce": "73645",
      "transaction_index": "0",
      "from_address_entity": null,
      "from_address_entity_logo": null,
      "from_address": "0x87917d879ba83ce3ada6e02d49a10c1ec1988062",
      "from_address_label": null,
      "to_address_entity": null,
      "to_address_entity_logo": null,
      "to_address": "0xa6610b3361c4c0d206aa3364cd985016c2d89386",
      "to_address_label": null,
      "value": "0",
      "gas": "47867",
      "gas_price": "5000000000000",
      "receipt_cumulative_gas_used": "47615",
      "receipt_gas_used": "47615",
      "receipt_contract_address": null,
      "receipt_status": "1",
      "block_timestamp": "2024-09-09T07:01:17.000Z",
      "block_number": "16386933",
      "block_hash": "0xb7d25de19e5eb2ddefec0bfce6d637dd49a8ab18a564e77f7434e0c691e2ab27",
      "transaction_fee": "0.238075",
      "method_label": "transfer",
      "nft_transfers": [],
      "erc20_transfers": [
        {
          "token_name": "AS Roma",
          "token_symbol": "ASR",
          "token_logo": null,
          "token_decimals": "0",
          "from_address_entity": null,
          "from_address_entity_logo": null,
          "from_address": "0x87917d879ba83ce3ada6e02d49a10c1ec1988062",
          "from_address_label": null,
          "to_address_entity": null,
          "to_address_entity_logo": null,
          "to_address": "0xf977814e90da44bfa03b6295a0616a897441acec",
          "to_address_label": null,
          "address": "0xa6610b3361c4c0d206aa3364cd985016c2d89386",
          "log_index": 0,
          "value": "77303",
          "possible_spam": false,
          "verified_contract": true,
          "security_score": null,
          "direction": "receive",
          "value_formatted": "77303"
        }
      ],
      "native_transfers": [],
      "abstract": "Acquired 77,303 ASR from 0x87...8062",
      "possible_spam": false,
      "class": "token obtain"
    },
    //...
  }
}

To be taught extra about this, please take a look at our pockets historical past documentation web page! 

Why Construct On Chiliz? – Exploring Use Circumstances

Now that you understand how to fetch on-chain knowledge from Chiliz utilizing Moralis, let’s discover some thrilling use instances: 

  • Ticketing Techniques: Construct modern ticketing programs and dapps that provide safe, blockchain-based tickets. 
  • Fan Engagement Platforms: Develop thrilling fan engagement platforms the place customers can take part in polls, Q&A classes, contests, and so on., with their favourite athletes and celebrities. 
  • Fantasy Leagues: Enhance the fantasy sports activities expertise by integrating one-of-a-kind digital belongings, real-time stats, and rewards for high gamers. 
  • Esports Platforms: Create esports platforms with modern token-based rewards, real-time knowledge integration, and seamless fan interactions. 
  • AR Video games: Construct AR video games – like Socios’ Token Hunt – that mix digital belongings with the bodily realm, letting gamers accumulate each NFTs and fungible tokens. 
Chiliz Chain Use Cases.

These 5 use instances are just a few outstanding examples; the one limiting issue right here is your creativeness! 

Abstract: Chiliz Chain Deep Dive – Why Construct on Chiliz Chain?

Chiliz launched again in 2018, and it’s an L1 community that goals to develop into the largest blockchain for sports activities and leisure manufacturers. Chiliz leverages a PoSA consensus mechanism to ship quick block finality and low transaction charges. 

However why must you construct on Chiliz? Listed here are 5 key advantages of the community: 

  • Seamless Developer Expertise: Chiliz is EVM-compatible. This implies you should utilize frequent Ethereum instruments to construct dapps on the community. 
  • Quick Transactions: With the PoSA consensus mechanism, Chiliz is ready to ship quick transaction finality. 
  • Low Charges: Chiliz options low transaction charges, making it a pretty blockchain for builders and finish customers alike. 
  • Established Ecosystem: With Chiliz, you’ll be able to attain tens of millions of customers from an already established fan base.
  • Massive Developer Group: Chiliz has a big developer neighborhood supported by grants and ongoing fuel charge repurposing. 

Along with highlighting some advantages of constructing on Chiliz, we additionally launched Moralis – the {industry}’s main Web3 knowledge supplier. With our Chiliz-compatible Web3 APIs, now you can seamlessly fetch all of the crypto knowledge you want in your dapps with out breaking a sweat. 

Moralis logo.

However why use Moralis to construct on Chiliz? 

  • Complete: With Moralis, you get extra knowledge with fewer calls. Question token balances, blockchain knowledge, a pockets’s full historical past, and extra with one line of code. 
  • Cross-Chain: Construct throughout all main chains, together with Chiliz, Ethereum, Optimism, and so on., with Moralis’ cross-chain appropriate APIs. 
  • Safe: Expertise enterprise-grade knowledge safety with the {industry}’s first SOC 2 Kind 2 licensed knowledge supplier.  

In case you favored this Chiliz article, contemplate studying extra content material right here on the weblog. For example, dive into our NFT Rarity API or discover ways to get token costs with an RPC node. 

Additionally, if you wish to leverage our Chiliz-compatible APIs your self, don’t overlook to enroll with Moralis! 



Source link

- Advertisement - spot_img

Latest stories

You might also like...