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

Sources

The source initiates a request.

Every midpoint has a Source that initiates a request. Midpoint sources specify exactly how an off-chain workflow begins, and passes any relevant data related to the request to downstream tasks.

Startpoint Called

Startpoint Called is used to trigger a midpoint from on-chain by making a call to the callMidpoint function in a Midpoint-deployed contract. Startpoint Called is used when creating oracles, data bridges, or any other workflow that begins with a contract on chain 'initiating' the workflow. For more information about Startpoint Called sources, go to Startpoint Called.

{
    "startpointCalledSource": {
        "whitelist": [
            {
                "chainId": "",
                "contractAddress": ""
            }
        ],
        "variables": [
            {
                "name": "",
                "datatype": ""
            }
        ],
        "extracts": [
            {
                "name": "",
                "from": ""
            }
        ],
        "excludeLogs": []
    }
}

EVM Event Emitted

EVM Event Emitted is used to trigger a midpoint whenever an on-chain event is emitted. These can be any event from a contract currently deployed on-chain, and does not have to go through Startpoints. When configuring an EVM Event Emitted source, you can specify indexed parameters, and particular values to listen for, if you want to listen for filtered events. EVM Event Emitted is used when creating alerts, listeners, data bridges, or any other workflow that begins with a contract on chain performing a particular action. For more information about the EVM Event Emitted task, go to EVM Event Emitted.

{
    "evmEventEmittedSource": {
        "chainId": "",
        "contractAddress": "",
        "eventName": "",
        "arguments": [
            {
                "name": "",
                "datatype": "",
                "indexed": false,
                "value": ""
            }
        ],
        "extracts": [
            {
                "name": "",
                "from": ""
            }
        ],
        "excludeLogs": []
    }
}

Cron Job Triggered

Cron Job Triggered is used to trigger a midpoint by following a crontab. This can be used to trigger a midpoint at a regular interval, such as every every minute, every thirty minutes, every hour, every week, or every month. Cron Job Triggered is used when creating price feeds, alerts, or any workflow that requires a regular execution of a midpoint. For more information about Cron Job Triggered, go to Cron Job Triggered.

{
    "cronJobTriggeredSource": {
        "crontab": "",
        "extracts": [
            {
                "name": "",
                "from": ""
            }
        ],
        "excludeLogs": []
    }
}

Sources have several common fields with Tasks. These components are outlined in Source and Task Definitions.

Don't see a Source that you need for your off-chain workflow? Get in touch.

PreviousMidpoint IDNextTasks

Last updated 2 years ago

Was this helpful?