Chainlink Chinese

The Chainlink Chinese Developer Hub

Welcome to the Chainlink Chinese developer hub. You'll find comprehensive guides and documentation to help you start working with Chainlink Chinese as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

节点运营

通过创建桥接类型将外部适配器添加到Chainlink节点。桥接器定义任务的名称和外部适配器的URL。当收到的任务类型不是核心适配器支持的类型时,该节点将搜索具有该名称的桥接类型,并使用桥接器连接到外部适配器。桥接器和任务类型名称不区分大小写。
桥接器可以在管理界面中的“创建桥接器”页面创建。指定好名称,URL以及可选的桥接确认数。

桥接器名字应该是在节点内唯一的,不管是在本地还是分别部署,桥接器URL应该是外部适配器的URL。
想要添加带有桥接器的任务,只要将桥接器名填入任务类型字段,比如下面的randomNumber类型。

{
  "initiators": [
    { "type": "runLog" }
  ],
  "tasks": [
    { "type": "randomNumber" },
    { "type": "copy",
      "params": {"copyPath": ["details", "current"]}},
    { "type": "multiply",
      "params": {"times": 100 }},
    { "type": "ethuint256" },
    { "type": "ethtx" }
  ]
}

由于randomNumber不是核心适配器,它是个外部适配器,请求中的每个节点都需要具有才能满足请求。如果你试图创建不存在的任务类型作为桥接器,创建将会失败。
您还可以在创建任务时从规范中排除额外参数。请求者会分别按请求指定它们:

{
  "initiators": [
    { "type": "runLog" }
  ],
  "tasks": [
    { "type": "randomNumber" },
    { "type": "copy" },
    { "type": "multiply" },
    { "type": "ethuint256" },
    { "type": "ethtx" }
  ]
}

Updated 9 months ago

节点运营


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.