Adaptor Creator

1. Adaptor Creator

The Adaptor Creator represents a foundational tool that defines the structure of off-chain inference requests, creating a standardized framework for AI agents, smart contracts, or other consumers to communicate effectively with off-chain data sources.

2. Parameter Specification

To create an adaptor, you need to specify several essential parameters that define its functionality, capabilities, and communication requirements. These parameters ensure that the adapter is correctly configured to facilitate interactions between different systems, particularly between on-chain and off-chain environments. Here are the critical parameters:

  • Name (String): Name of the adaptor.

  • Provider: Choose a data provider (Currently, We provide a list of providers. You can choose one that fits your requirements).

  • Network: The network you wish to deploy on (Base, Rivalz, Arbitrum).

  • Description(String): Provides a brief description of what the adapter does.

  • Variables (String): Defines the adapter’s variables in a comma-separated string format for easy processing and validation.

  • Category ID(Number): The ID of the category this adaptor belongs to.

  • Output Type ID(Number): Specifies the ID of the output type that the adapter will produce. ( Currently, We support four different types of output: Bool, Bytes, Uint256, StringAndBool )

  • Prompt: Describe the specific actions or functionality you want your consumer contract to perform.

During the generation process, the system will automatically create a unique JobID in a format compatible with Solidity's bytes32 type. This JobID serves as a unique identifier and must be generated before the creation of the adaptor.

For example jobID: 0x1b364865ca3e6bb5ada098d0ea96f9e9369b5693cacede79d1352334c4213ac2

3. How to create an Adaptor

Step-by-step guide on how to approach building an adaptor

  1. Visit the Rivalz ADCS at https://adcsdev.rivalz.ai/ . Next, select "Connect Wallet" in the header to login the website.

  1. Click "Your Adaptor" and then Click the "Create Adaptor" button.

  1. Create your adaptor

In this example, I would like to build a simple application designed to gather real-time token price data. From this foundation, you can expand the functionality by integrating AI agents to analyze the data, providing users with actionable insights.

For example, by leveraging AI-driven models, you can develop PriceIntel, an advanced system that evaluates current and historical token price trends to help predict future movements. Based on this analysis, the AI agent can assess whether the price of a specific token is likely to increase or decrease, offering actionable predictions for users in the context of:

  • Trading: Deciding when to buy or sell tokens based on predictive trends.

After defining all the necessary information for your adaptor, click the 'Create Adaptor' button.

Congratulations! You have successfully created an adaptor !

Last updated