A pre-built solution for verifying tasks using methods found in Smart Contracts

The Contract Query task type offers a convenient mechanism for verifying a variety of onchain tasks using the methods found in Smart Contracts. However, this solution is not universally applicable across all networks. See below to learn about this task type, its limitations, and how it can be set up.

<aside> <img src="https://prod-files-secure.s3.us-west-2.amazonaws.com/046d56bb-337c-428c-ba45-93717675a29f/44746536-e16d-4400-be7a-0e61592d1c40/Round_Gradient_Background_(1).png" alt="https://prod-files-secure.s3.us-west-2.amazonaws.com/046d56bb-337c-428c-ba45-93717675a29f/44746536-e16d-4400-be7a-0e61592d1c40/Round_Gradient_Background_(1).png" width="40px" />

Course Navigation

  1. Course Introduction
  2. Task verification on Galxe: How does it work?
  3. What kinds of onchain tasks can be verified on Galxe Quest?
  4. Onchain task types on Galxe Quest
    1. NFT Holder tasks
    2. Snapshot Vote tasks
    3. Wallet Balance tasks
    4. Contract Query tasks - Current Page
    5. Import Your Own Data tasks
      1. Import Your Own Data task set up requirements
      2. Setting up Import Your Own Data Tasks
  5. Strategy considerations for onchain tasks
  6. Troubleshooting and resolving common issues with onchain tasks
  7. Course Completion and Certification </aside>

The Contract Query task type - how it works

A tour of the Contract Query task type and its features

A tour of the Contract Query task type and its features

The Contract Query task type on Galxe Quest is a pre-built solution for verifying onchain interactions with a particular Smart Contract. When a quest participant clicks the verify button of a Contract Query task, Galxe verifies the task by comparing two relevant data points. The first data point is the EVM wallet address bound to their Galxe Account. The second point of comparison is data returned to Galxe after invoking a method of the Smart Contract while setting the user’s bound wallet address as a parameter in that method.

In other words, when Galxe verifies a Contract Query task, it takes the user’s wallet address and asks the Smart Contract about specific past interactions the user’s wallet address has had with the contract (based on the options you select when setting up the task). The Smart Contract method tells Galxe whether the wallet address has completed the task, and Galxe verifies (or not) based on the answer returned from the contract method.

Limitations of the Contract Query task type

The Contract Query task type uses the Ethereum JSON-RPC API to gather verification data, and will therefore only work with EVM-compatible networks. For some of these networks, Galxe already has access to an RPC which can provide the data. The networks for which Galxe already has RPC access are as follows:

Other EVM-compatible networks are still supported so long as you are able to provide the URL of a customized RPC.

Networks which are non EVM-compatible are not supported by the Contract Query task type. For onchain task verification on other networks, it’s recommend you use the Import Your Own Data task type.

What is required to set up a Contract Query task

Contract Query task set up differs based on whether the Smart Contract is deployed on one of the networks for which Galxe already has RPC access (listed above), or on another EVM-compatible network.