### Replit AI Prompt for Chiliz dApp Frontend Setup Source: https://docs.chiliz.com/develop/basics/how-tos/how-to-build-a-chiliz-dapp-with-ai-tools An example prompt for Replit AI to generate a frontend for a Chiliz dApp, specifying network details, smart contract address, and desired functionalities. ```APIDOC Prompt for Replit AI: "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 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." ``` -------------------------------- ### Install Dependencies and Start Indexer Source: https://docs.chiliz.com/develop/advanced/how-to-create-telegram-notifications-for-fan-token-transfers Installs project dependencies using pnpm and starts the Envio indexer in development mode. This command initiates the process of monitoring Chiliz Fan Token transfers. ```bash pnpm i pnpm envio dev ``` -------------------------------- ### AI Prompt for Contract Verification Source: https://docs.chiliz.com/develop/basics/how-tos/how-to-build-a-chiliz-dapp-with-ai-tools A prompt example to guide an AI in assisting with the Chiliscan contract verification process, including necessary contract details. ```APIDOC Prompt for AI: "I need to verify my Solidity smart contract on Chiliscan. The contract address is `0xxxxxxxx`. The compiler version I used was 0.8.23. Can you tell me what to put in the fields for ... ?" ``` -------------------------------- ### Initialize a Subgraph Project Source: https://docs.chiliz.com/develop/advanced/how-to-follow-transfers-of-a-fan-token Initializes a new subgraph project. This command sets up the necessary files and configurations for your subgraph, allowing you to define data sources and mappings. The `--studio` flag connects it to Subgraph Studio. ```bash graph init --studio ``` ```bash graph init docs-psg-followup-chiliz-chain ``` -------------------------------- ### Get Wallet Balance with Tatum SDK (Chiliz) Source: https://docs.chiliz.com/develop/basics/how-tos/how-to-get-the-balance-of-a-wallet Retrieves all assets held by a wallet address on the Chiliz Chain using the Tatum SDK. This example demonstrates fetching the balance of a specific address, returning a list of assets and their amounts. Ensure the Tatum SDK is installed. ```typescript // yarn add @tatumio/tatum import {TatumSDK, Network, Chiliz, ResponseDto, AddressBalance} from '@@tatumio/tatum' const tatum = await TatumSDK.init({network: Network.CHILIZ}) const balance: ResponseDto = await tatum.address.getBalance({ addresses: ['0xF64E82131BE01618487Da5142fc9d289cbb60E9d'], // replace with your address }) console.log(balance.data) ``` -------------------------------- ### Get NFT Metadata with Tatum (TypeScript) Source: https://docs.chiliz.com/develop/basics/how-tos/how-to-get-the-metadata-of-a-specific-nft Fetches NFT metadata using the Tatum SDK. This example demonstrates initializing the SDK for Chiliz network and calling the getNFTMetadata method with token address and ID. ```typescript // yarn add @tatumio/tatum import {TatumSDK, Network, Chiliz, ResponseDto, NftTokenDetail} from '@tatumio/tatum' const tatum = await TatumSDK.init({network: Network.CHILIZ}) const metadata: ResponseDto = await tatum.nft.getNftMetadata({ tokenAddress: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', // replace with your collection tokenId: '1' }) console.log(metadata.data) ``` -------------------------------- ### Install The Graph CLI Source: https://docs.chiliz.com/develop/advanced/how-to-follow-transfers-of-a-fan-token Installs the Graph command-line interface globally on your local machine. This tool is essential for interacting with The Graph network and managing subgraphs. ```bash npm install -g @graphprotocol/graph-cli ``` -------------------------------- ### Remix IDE Compilation and Deployment Steps Source: https://docs.chiliz.com/develop/basics/how-tos/how-to-build-a-chiliz-dapp-with-ai-tools Instructions for using Remix IDE to compile and deploy smart contracts on Chiliz Chain. This includes setting the correct Solidity compiler version and initiating the compilation process. ```APIDOC Remix IDE Workflow: 1. Open Remix IDE: Navigate to remix.ethereum.org. 2. Upload Contract: - In the 'File Explorers' tab, create a new file. - Paste the generated Solidity code into the new file. 3. Compile Contract: - Go to the 'Solidity Compiler' tab. - Set Compiler version to "0.8.23+xxx". - Click the 'Compile' button. Related Actions: - Detailed Remix deployment guide available at: ../../../quick-start/deploy-and-verify-a-contract/deploy-with-remix-ide ```