Blockchain Chainlink消费者合约中回调地址的用途是什么?

Blockchain Chainlink消费者合约中回调地址的用途是什么?,blockchain,ethereum,solidity,rsk,Blockchain,Ethereum,Solidity,Rsk,我有一个关于RSK集成的问题(特别是关于如何使用回调地址) 这些来自Consumer.sol(以上来自RSK,以下来自原件) 为什么RSK使用者需要回叫地址?这是做什么的/它是如何工作的?这两个函数都有回叫地址。您将在第二种方法中看到,他们只是使用“this”。回调地址是“buildChainlinkRequest”函数中的一个参数。它指定将数据返回到哪个合同。与函数选择器相结合,您可以选择要将数据返回到的合同和函数 第二个方法没有回调地址,因为它被设置为“this”。第一个函数允许您选择

我有一个关于RSK集成的问题(特别是关于如何使用回调地址)

这些来自Consumer.sol(以上来自RSK,以下来自原件)
为什么RSK使用者需要回叫地址?这是做什么的/它是如何工作的?

这两个函数都有回叫地址。您将在第二种方法中看到,他们只是使用“this”。回调地址是“buildChainlinkRequest”函数中的一个参数。它指定将数据返回到哪个合同。与函数选择器相结合,您可以选择要将数据返回到的合同和函数

第二个方法没有回调地址,因为它被设置为“this”。第一个函数允许您选择

 function requestRIFPriceByCallback(uint256 _payment, address _callback) public {
    Chainlink.Request memory req = buildChainlinkRequest(specId, _callback, this.fulfill.selector);
    req.add("get", "https://api.liquid.com/products/580");
    req.add("path", "last_traded_price");
    req.addInt("times", 100000000);
    sendChainlinkRequest(req, _payment);
  }
function requestEthereumPrice(string _currency) public {
    Chainlink.Request memory req = buildChainlinkRequest(specId, this, this.fulfill.selector);
    req.add("get", "https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=USD,EUR,JPY");
    string[] memory path = new string[](1);
    path[0] = _currency;
    req.addStringArray("path", path);
    sendChainlinkRequest(req, ORACLE_PAYMENT);
  }