Guides

Supported Reference Modules

Introduction

The Supported Reference Modules query allows you to retrieve a list of supported reference modules. These modules include known supported modules with detailed information and unknown supported modules with basic contract information. This query helps you explore the available reference modules for the protocol.

Query: supportedReferenceModules

Retrieve a list of supported reference modules.

Input

  • request (Type: SupportedModulesRequest!): An object that contains the query parameters.
    • includeUnknown (Type: Boolean, Default: false): Indicates whether to include unknown supported modules in the results.

Output

  • items (Type: [ReferenceModule!]): A list of ReferenceModule objects, including both known and unknown supported modules.

    • For Known Supported Modules:
      • moduleName (Type: String!): The name of the module.
      • contract (Type: ContractInfo!): Information about the module's contract.
        • address (Type: String!): The Ethereum address of the contract.
        • chainId (Type: Int!): The chain ID associated with the contract.
      • moduleInput (Type: [InputField!]): Input fields required by the module for configuration.
        • name (Type: String!): The name of the input field.
        • type (Type: String!): The data type of the input field.
      • redeemInput (Type: [InputField!]): Input fields required for redeeming rewards.
        • name (Type: String!): The name of the input field.
        • type (Type: String!): The data type of the input field.
      • returnDataInput (Type: [InputField!]): Input fields required for returning data.
        • name (Type: String!): The name of the input field.
        • type (Type: String!): The data type of the input field.
    • For Unknown Supported Modules:
      • moduleName (Type: String!): The name of the module.
      • contract (Type: ContractInfo!): Information about the module's contract.
        • address (Type: String!): The Ethereum address of the contract.
        • chainId (Type: Int!): The chain ID associated with the contract.
  • pageInfo (Type: PageInfo): Pagination information for navigating the list.

    • prev (Type: String): The previous page token for pagination.
    • next (Type: String): The next page token for pagination.

Input Type: SupportedModulesRequest

This input type is used to specify the parameters for the supportedReferenceModules query.

Fields

  • includeUnknown (Type: Boolean, Default: false): Indicates whether to include unknown supported modules in the results.

Example Query

Here's an example query that retrieves a list of supported reference modules:

query {
  supportedReferenceModules(request: { includeUnknown: true }) {
    items {
      ... on KnownSupportedModule {
        moduleName
        contract {
          address
          chainId
        }
        moduleInput {
          name
          type
        }
        redeemInput {
          name
          type
        }
        returnDataInput {
          name
          type
        }
      }
      ... on UnknownSupportedModule {
        moduleName
        contract {
          address
          chainId
        }
      }
    }
    pageInfo {
      prev
      next
    }
  }
}