Introduction

When you want to perform custom computation or custom logic to bring data via specialized APIs, then an External Adapter is the way to go. It helps Plugin to enable an easy way of integrating the custom logic.

It is a service that the Plugin node communicates via its API with a simple JSON specification.

Information on external adapters is broken up into three main categories: contract creators, developers, and node operators.

  • Contract Creators will need to know how to specify an external adapter in their request for external data.

  • Developers will need to know how to implement an external adapter for an API.

  • Node Operators will need to know how to add an external adapter to their node so that they can provide specialized services to smart contracts.

Is it necessary to implement an External Adapter?

  • Yes, it is when you want to perform complex logic before the data gets written onto the smart contract.

  • For ex - Let's say, you are pulling the data from the "External world" using API, and the data from the API result needs to be formatted

External Initiator defines, when and how a job will run

To set up an external adapter, the node operator need to perform these 3 steps

  • Setup Bridge in the Plugin Node

  • Update jobspec to have Bridge

  • Setup External-Adapter server program in the same node

    • Basically, this step decides what kind of services a job is provided to end users. For instance, "Index Pair (BTC/USDT), (ETH/USDT), (ETC/XDC)" etc.,

Last updated