Gelato
  • Introduction
    • Gelato, The Web3 Cloud Platform
  • Rollup As A Service
    • Introduction
    • Rollup Stacks
      • Arbitrum Orbit
        • Run a Full Orbit Node
      • OP Stack
        • Run OP Node
    • Deploy your Rollup
    • Customization
      • Data Availability
        • Celestia
        • Avail
        • Eigen DA
      • Custom Gas Token
      • Marketplace
        • Gelato Services
        • Data Indexers
        • Block Explorers
        • Oracles
        • Bridges
        • Account Abstraction
        • On & Off-ramp
        • Community
        • Identity & KYC
        • Others
      • Verifier Node Package
    • Public Testnet
  • RPC Nodes
    • Introduction
    • Compute Units
    • Using RPC Nodes
    • Supported Networks
    • Pricing and Plans
    • FAQ
  • Web3 Services
    • Web3 Functions
      • Understanding Web3 Functions
        • Trigger Types
        • Typescript Function
        • Solidity Function
        • Automated Transactions
      • Security Considerations
      • Template & Use Cases
      • Quick Start
        • Writing Typescript Functions
          • Event Trigger
          • Private Typescript Functions
          • Callbacks
        • Test, Deploy & Run Typescript functions
        • Writing Solidity Functions
        • Test, Deploy & Run Solidity Functions
        • Initiate an Automated Transaction
      • Create a Web3 Function Task
        • Using the UI
        • Using the Safe App
        • Using a Smart Contract
        • Using the Automate SDK
      • Analytics & Monitoring
      • Supported Networks
      • Subscription & Payments
      • Legacy Automate Migration Guide
    • Relay
      • What is Relaying?
      • Security Considerations
        • ERC-2771 Delegatecall Vulnerability
      • Templates
      • Quick Start
        • Sponsored Calls
        • Non-Sponsored Calls
      • ERC-2771 (recommended)
        • SponsoredCallERC2771
        • CallWithSyncFeeERC2771
          • Relay Context Contracts ERC2771
      • Non-ERC-2771
        • SponsoredCall
        • CallWithSyncFee
          • Relay Context Contracts
      • Relay API
      • Gelato's Fee Oracle
      • Tracking your Relay Request
      • Supported Networks
      • Subscriptions and Payments
        • 1Balance & Relay
        • SyncFee Payment Tokens
        • Relay Pricing
      • ERC2771 Migration Guide
    • VRF
      • Understanding VRF
      • How does Gelato VRF Work?
      • Security Considerations
      • Template
      • Quick Start
      • Create a VRF Task
        • Create a Fallback VRF
        • Migrating from Chainlink VRF
      • Supported Networks
      • Pricing & Rate Limits
    • Oracles
      • Understanding Gelato Oracles
      • Quick Start
      • Data Providers
        • Stork
        • Choas Labs
      • Migrating from Chainlink Oracles
      • Available Price Feeds
      • Supported Networks
      • Pricing & Rate Limits
    • Account Abstraction
      • Understanding ERC4337
      • Introduction to Gelato Bundler
      • Templates & Examples
      • Quick Start
      • Sponsored UserOps
        • Using 1Balance
        • Using Zerodev Paymaster
      • Non-Sponsored UserOps
        • Pay with Native
        • Pay with ERC20
      • Supported Networks
      • Bundler API Endpoints
        • eth_sendUserOperation
        • eth_estimateUserOperationGas
        • eth_getUserOperationByHash
        • eth_getUserOperationReceipt
        • eth_supportedEntryPoints
        • eth_maxPriorityFeePerGas
        • eth_chainId
    • 1Balance
      • 1Balance Alerts
      • Subscription Plans
      • Subscription Notifications
      • USDC Addresses
    • AI Agents
    • Teams
  • GELATO DAO
    • DAO & Token (GEL)
    • GEL Token Contracts
    • Governance Process
  • Social Media
Powered by GitBook
On this page
  • Understand the Implications
  • Initiate Migration
  • Updating the Oracle Aggregator Address
  1. Web3 Services
  2. Oracles

Migrating from Chainlink Oracles

PreviousChoas LabsNextAvailable Price Feeds

Last updated 2 months ago

Already using Chainlink Oracles? Here's how you can quickly and easily migrate to Gelato Oracles.

Understand the Implications

While this migration option is available, be aware that it can lead to higher gas costs and added development intricacies. We advise this route only if:

  • You've already deployed a Chainlink Oracle Consumer.

  • Your Chainlink Oracle Consumer has the capability to update its Aggregator address.

Otherwise, for new integrations, we recommend directly implementing the Gelato Oracles.

Initiate Migration

If you're set on migrating an existing Chainlink Oracle Consumer:

  • Begin by creating your Oracle task following the steps in the guide. In the final step, make sure to select Chainlink Compatibility Mode

  • You will then be asked to deploy your Adapter contract:

  • Once deployed, the app will show you the address to which the adapter contract was deployed. You now need to replace the old Aggregator address in your contract by this address.

Updating the Oracle Aggregator Address

Here’s a brief example of how you might implement such a function to update the aggregator in your Consumer Contract:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

import {
    AggregatorV3Interface
} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

contract ChainlinkCompatibleContract {
    AggregatorV3Interface internal dataFeed;
    address public owner;

    modifier onlyOwner() {
        require(msg.sender == owner, "Only owner can call this function");
        _;
    }

    function setAggregator(address _aggregator) public onlyOwner {
        dataFeed = AggregatorV3Interface(_aggregator);
    }
}
Quick Start