LogoLogo
MidpointContact UsThe Docs are Wrong!
  • What is Midpoint
  • What actually is a midpoint?
  • Midpoint FAQs
  • Get Started
    • Sample Midpoints
      • Filecoin Filrep Oracle: Obtain miner reputations on-chain
      • Oracle: Call any API from a smart contract
      • Listener: Subscribe an internal service to any event
      • Data Feed: Stream a data feed on-chain at regular intervals
      • Data Bridge: Pass arbitrary messages between chains
      • Automation: Ensure a function is called at regular intervals
    • Videos
  • Using Midpoint
    • API Key
    • Midpoint CLI
    • GraphQL API
    • Dashboard
  • Core Concepts
    • Midpoints
      • Midpoint ID
      • Sources
      • Tasks
      • Source and Task Definitions
        • Secrets
        • Variables
        • Exclude Logs
        • Extracts
    • Requests
      • Request ID
      • Events
    • Credits and Payment
  • Sources
    • Startpoint Called
    • EVM Event Emitted
    • Cron Job Triggered
  • Tasks
    • Make HTTP Request
      • OAuth and Multi-Step Authentication
    • Call EVM Function
    • Transact to EVM Function
      • Security
    • Shift Decimal
  • More Reading
    • Chain IDs
    • Startpoints
    • Midpoint EOAs
  • Get in Touch
    • Contact Links
Powered by GitBook
On this page

Was this helpful?

  1. Core Concepts
  2. Midpoints

Midpoint ID

A unique identifier for each midpoint.

PreviousMidpointsNextSources

Last updated 2 years ago

Was this helpful?

Every midpoint is assigned a globally-unique and immutable identifier on creation - known as a Midpoint ID. Midpoint IDs (commonly writen as MIDs) are used across the Midpoint system to identify and refer to midpoints.

Midpoint IDs appear in the following places:

  • In the GraphQL API, the MID is used to identify which midpoint is to be queried or modified.

  • On the Midpoint dashboard they are visible from the main screen and the page for each midpoint.

  • When using the CLI, the MID is found in the midpoint.conf file. Any midpoint commands that make remote changes will use midpoint.conf as their MID.

  • In contracts that you deploy.

    • Midpoint IDs are used on-chain when making a call to a midpoint to identify the target midpoint.

      • // Make a call to the midpoint with MID of midpointID
        IMidpoint(startpointAddress).callMidpoint(midpointID, args);
    • We strongly recommend checking the MID of incoming requests. See for more details.

      • // Verify that data is being returned for your midpoint
        require(midpointID == _midpointId, "Invalid Midpoint ID");

During execution of a request, the Midpoint ID can be extracted from any of the source types using the keyword Midpoint_ID.

Transact to EVM Function Security