LYNC
DashboardSupport
  • 👋Introducing LYNC
  • Products
    • LYNC Account Abstraction SDK
    • LYNC Account Abstraction WebGL SDK
    • Metamask Wallet
    • LYNC Metamask PC SDK
    • OKX Wallet
    • LYNC In-Game Marketplace SDK
    • NFT Fetcher
    • No-Code Smart Contract Deployer
    • EVM Lootbox SDK
      • Getting Started
      • Using the SDK
        • Creating a new lootbox
        • Opening a lootbox
        • Claiming rewards
        • Whitelisting users using lootbox
        • Lootbox admin functions
        • Useful information functions from LyncLootBox class
        • Multicall : opening and claiming multiple lootboxes in a single transaction
      • Example Codes in React & TypeScript
        • Example code for creating a new lootbox
        • Example code for opening a lootbox
        • Example code for claiming a lootbox
    • Launch your products on Telegram
      • Configure Your Telegram Bot
      • Deploying Your Product on TG
  • APTOS
    • LYNC Paymaster - Supporting Aptos
      • How to Register on LYNC Dashboard
      • How to Create Paymaster
      • How to Fund the Paymaster
      • Module & Function Whitelist
      • How to Integrate Paymaster
        • Unity
        • API
        • JavaScript/ TypeScript
    • LYNC Unity Aptos SDK
    • Keyless Accounts
      • Configure Your OIDC Provider
      • Integrate Keyless in Unity
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
        • Mint NFT transactions
        • Send generic transactions on Aptos
    • LYNC Social Login SDK on Aptos
      • Getting Started
      • Using the SDK
      • Example Codes in React & TypeScript
      • Types Used in the Methods Provided by the SDK
      • Other Specification
    • LYNC Aptos Lootbox
      • Getting Started
      • Creating a Lootbox
      • Opening a Lootbox
      • Claiming the Rewards
      • Conclusion
  • Movement Labs
    • 📇Indexer
      • How to run index custom data?
      • Example Queries
        • Get Token Info
        • Get Token Balances
        • Get NFTs Owned by an Account
    • NFT Deployer
    • LYNC Social Login SDK on Movement
      • Getting Started
      • Using the SDK
      • Example Codes in React & TypeScript
      • Types and Enums Used in the Methods Provided by the SDK
      • Other Specification
    • LYNC Unity Movement SDK
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
        • Mint NFT transactions
    • LYNC Paymaster - Supporting Movement
      • How to Register on LYNC Dashboard
      • How to Create Paymaster
      • How to Fund the Paymaster
      • Module & Function Whitelist
      • How to Integrate Paymaster
        • JavaScript/ TypeScript
  • Supra
    • LYNC Paymaster - Supporting Supra L1
      • How to Register on LYNC Dashboard
      • How to Create Paymaster
      • How to Fund the Paymaster
      • Module & Function Whitelist
      • How to Integrate Paymaster
        • JavaScript/ TypeScript
    • LYNC Unity SUPRA SDK
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
        • Mint NFT transactions
  • Fuel
    • LYNC Unity Fuel SDK
    • LYNC NFT Deployer
      • Introduction
      • Getting Started
      • Deploying Your NFTs
        • Launch Your Entire Collection
      • Troubleshooting and FAQs
    • LYNC Fuel Lootbox
      • Getting Started
      • Creating a Lootbox
      • Opening a Lootbox
      • Claiming the Rewards
      • Conclusion
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
    • Fuel Marketplace NPM SDK
      • Getting Started
      • Using the SDK
        • Using hooks to get the marketplace data
        • Using services provided by the SDK to list, buy, and manage tokens
        • Some useful functions provided by the SDK
        • Error codes for the SDK
        • Interfaces and Enums provided by the SDK
      • Support
  • Metis
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
        • Mint NFT transactions
  • NPM Packages
    • Marketplace
      • Hook: useAllCollectionNFT
      • Hook: useAllBuyNFT
      • Hook: useAllOwnerNFT
      • Hook: useNFTDetails
      • Hook: useAllNFTForRent
Powered by GitBook
On this page
  • Step 1. Create Subgraph
  • Step 2. Get AUTH TOKEN from LYNC team
  • Step 3. Set your AUTH TOKEN to prepare for deployment
  • Step 4: Create a new subgraph
  • Step 5: Deploy you created subgraph:
  • Troubleshooting
  1. Movement Labs
  2. Indexer

How to run index custom data?

PreviousIndexerNextExample Queries

Last updated 9 months ago

To to deploy your subgraph on movement mevm devnet.

Step 1. Create Subgraph

Create your subgraph:

Once done, Make sure to set network to devnet

NOTE: Set your network to devnet in your subgraph.yaml file manually. It will not be listed in the graph init command because mevm is not yet supported by thegraph.

Your subgraph.yaml should look something like this:

specVersion: 0.0.4
schema:
  file: ./schema.graphql
dataSources:
  - kind: ethereum
    name: ERC1155
    network: devnet
    source:
      abi: ERC1155
      address: "0x4114e6516413c5ba631002a0cf95e828714f8f18"
      startBlock: 1785835
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.6
      language: wasm/assemblyscript
      entities:
        - NFT
        - NftData
        - NftApprovalForAll
      abis:
        - name: ERC1155
          file: ./abis/ERC1155.json
      eventHandlers:
        - event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[])
          handler: handleTransferBatch1155
        - event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)
          handler: handleTransferSingle1155
        - event: URI(string,indexed uint256)
          handler: handleURI1155
        - event: ApprovalForAll(indexed address,indexed address,bool)
          handler: handleApprovalForAll1155
      file: ./src/mapping.ts

NOTE: This is just an example no need to copy it as it is.

Step 3. Set your AUTH TOKEN to prepare for deployment

In your subgraph directory run:

graph auth https://api.mevm-devnet.lync.world/deploy

This will prompt you to enter your deploy key. Pass the AUTH TOKEN in there.

Step 4: Create a new subgraph

graph create --node https://api.mevm-devnet.lync.world/deploy <PROJECT>/<NAME>

Note: Replace the <PROJECT>/<NAME> accordingly. Example lync/nfts

If you have properly setup the correct AUTH TOKEN and subgraph name you should see output like this:

Step 5: Deploy you created subgraph:

In the subgraph directory after completing the above steps run:

graph deploy <PROJECT>/<NAME> --node https://api.mevm-devnet.lync.world/deploy --ipfs https://ipfs.lync.world

Note: Replace the <PROJECT>/<NAME> accordingly. Example lync/nfts

If everything goes right you will see output like:

Note: Currently we do not have any validations on version label so it can be anything.

Also, you can ignore the HTTP queries endpoint that is shown in the output.

The subgraph will be deployed on:

https://mevm-devnet.lync.world/subgraphs/name/<PROJECT>/<NAME>

Note: Replace the <PROJECT>/<NAME> accordingly. Example lync/nfts

You can use this endpoint to query your subgraph data using graphql.

Troubleshooting

If while deploying the subgraph you face any errors like:

x graph create --node <https://api.mevm-devnet.lync.world/deploy> lync/nfts
 ›   Warning: In next major version, this command will be merged as a subcommand for `graph local`.
✖ HTTP error creating the subgraph: 480
/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/errors/index.js:21
    throw new exit_2.ExitError(code);
    ^

ExitError: EEXIT: 1
    at Object.exit (/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/errors/index.js:21:11)
    at CreateCommand.exit (/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/@oclif/core/lib/command.js:131:23)
    at /home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/dist/commands/create.js:50:22
    at Client._parseResponse (/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/index.js:190:12)
    at /home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/index.js:149:10
    at IncomingMessage.<anonymous> (/home/tit4n/.nvm/versions/node/v20.14.0/lib/node_modules/@graphprotocol/graph-cli/node_modules/jayson/lib/client/http.js:80:11)
    at IncomingMessage.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  oclif: { exit: 1 },
  code: 'EEXIT'
}

Node.js v20.14.0

Here, take a look at the error code. 480 in the output above.

ERROR CODE
REASON
SOLUTION

401

Request Unauthorized

470

Naming format not followed properly

The name of the subgraph should be in the format <PROJECT>/<NAME>

480

Name already taken

Reuse of the subgraph name is not allowed. Use a different name.

500

Internal Server error

Step 2. Get AUTH TOKEN from

Get your AUTH TOKEN from

If you get any error(s) refer to the

Make sure the AUTH TOKEN is correct and run the graph auth command .

📇
https://thegraph.com/docs/en/developing/creating-a-subgraph/
LYNC team
LYNC Team
Troubleshooting section
Contact LYNC Support
again