Core components
ADCS Oracle Contracts
The ADCS Oracle contracts are the cornerstone of the ADCS platform, responsible for managing data requests and fulfillment between blockchain applications and AI providers. The system is built around the ADCSCoordinator
contract, which handles oracle registration, request management, and data fulfillment.
Key Components
1. Oracle Management
The coordinator maintains a registry of authorized oracles with a maximum limit of 255 oracles. Key functions include:
2. Request Management
Each data request is uniquely identified and tracked using a commitment-based system:
3. Data Fulfillment
The contract supports multiple data types for fulfillment:
uint256: Numerical values
bool: Boolean values
bytes32: Fixed-size byte arrays
bytes: Dynamic byte arrays
StringAndBool: Combined string and boolean values
Example of fulfillment function:
Security Features
Request Validation: Each request is validated using a commitment scheme that ensures:
Oracle authentication
Request integrity
Single submission per oracle
Proper gas limit enforcement
Reentrancy Protection: The contract implements reentrancy guards to prevent malicious callbacks:
Access Control: Only registered oracles can fulfill requests, and only the contract owner can manage oracle registration.
Event System
The contract emits detailed events for tracking and monitoring:
OracleRegistered
: When a new oracle is registeredDataRequested
: When a new request is createdDataRequestFulfilled
: When data is successfully deliveredVarious typed fulfillment events for different response types
Integration Points
Coordinator Contract Addresses
Arbitrum:
0x07811b8B6151db734b8D1568918d3A62607879a7
Base:
0x91c5d6e9F50ec656e7094df9fC035924AAA428bb
Avalanche:
0x55Ee887dB181B41f69b3313065b1eD6BEE3336A1
Berachain:
0x55Ee887dB181B41f69b3313065b1eD6BEE3336A1
Bsc:
0xcb8BaEf34aDBB414fAB51EC6Ac1C0e4D0340e824
OP:
0x55Ee887dB181B41f69b3313065b1eD6BEE3336A1
Polygon:
0x55Ee887dB181B41f69b3313065b1eD6BEE3336A1
Sonic:
0x55Ee887dB181B41f69b3313065b1eD6BEE3336A1
Request Flow
Consumer contracts make requests through the coordinator
Registered oracles monitor for
DataRequested
eventsOracles process requests and submit responses
The coordinator validates and forwards responses to consumers
Consumers receive data through their fulfillment functions
Error Handling
The contract includes comprehensive error handling:
TooManyOracles
: When oracle limit is reachedUnregisteredOracleFulfillment
: When unregistered oracle attempts fulfillmentInvalidJobId
: For malformed job identifiersOracleAlreadySubmitted
: To prevent duplicate submissions
Providers
ADCS Providers are the actual LLM models and the entities that host them. A provider can be a single LLM model or a group of models that perform different tasks. This is the brain of the inference process where users can specify extra context and parameters via an Adaptor. Provider attributes include:
Provider Name
LLM Model Name or list of LLM models
Provider Description
Provider API Endpoint
Provider API Documentation
Example execution result
How to Become a Provider
Adaptors
ADCS Adaptors act as bridges between the ADCS Oracle contracts and the Providers. They are responsible for providing extra context and formatting the request and response data between the two.
Adaptors can be created by leveraging other adaptors and providers as context. This composability allows developers to build more complex and specialized adaptors by combining the functionality of existing components, enabling greater flexibility and reusability within the ADCS ecosystem.
Adaptor attributes include:
Adaptor Name
Adaptor ID
Category
Network
Providers Used
Output Type
Integration Code Example
Playground for Testing
Parameters Required for Execution
Thinking Process
Correct Output Format
Consumer Contracts
ADCS Consumer contracts request and process data from the ADCS platform. You can find example consumer contracts here
We currently support 4 data types for fulfillment:
Uint256
Bool
Bytes32
Bytes
StringAndBool
Last updated