Skip to content

Conflux-Network-Global/conflux-network-adapter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chainlink External Adapter for Conflux Network

This adapter is built to fulfill Chainlink oracle requests.

Configuration

The adapter uses the following environment variables:

  • URL: A URL to a JSON-RPC (HTTP RPC) node on Conflux Network
  • PRIVATE_KEY: The private key to sign transactions with. Must have fulfillment permissions on the Oracle contract.
  • EA_PORT: Configure this parameter to change the EA port

Input Params

  • address or cfxAddress: The oracle contract to fulfill the request on
  • dataPrefix or cfxDataPrefix: The data prefix in the request
  • functionSelector or cfxFunctionSelector: The fulfillment function selector
  • result or value: The value to fulfill the request with

Starting Commands (local deployment)

node -e "require(\"dotenv\").config() && require(\"./index.js\").server()"

Output

{
    "jobRunID": "test123",
    "data": {
        "result": "0x560d6081e276e1c3c1e58aba722ab2848315442a196fcc89a13baa8bc7e34a78"
    },
    "result": "0x560d6081e276e1c3c1e58aba722ab2848315442a196fcc89a13baa8bc7e34a78",
    "statusCode": 200
}

About

External adapter for Conflux Network and Chainlink nodes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 91.1%
  • Dockerfile 8.9%