'chainlink: how to deploy an Operator with v0.8?
I started with v0.6 and connected my node to an operator (called Oracle at the time)
pragma solidity ^0.6.0;
import "@chainlink/contracts/src/v0.6/Oracle.sol";
contract MyOperator is Oracle {
constructor(address _link) Oracle(_link) public {}
}
My client contract using those libs
pragma solidity ^0.6.6;
import "@chainlink/contracts/src/v0.6/ChainlinkClient.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
I had to connect them using setFulfiullmentPermissions at the time:
await operator.setFulfillmentPermission(nodeAddress, true, {
from: owner,
});
======= I then moved to v0.7 with my Operator being
pragma solidity ^0.7.0;
import "@chainlink/contracts/src/v0.7/dev/Operator.sol";
contract MyOperator is Operator {
constructor(address _link, address owner) Operator(_link, owner) public {}
}
My client contract using those libs
pragma solidity ^0.7.0;
import "@chainlink/contracts/src/v0.7/ChainlinkClient.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
this time the authorization code looked like this
let tx = await operator.setAuthorizedSenders([nodeAddress], { from: owner });
===== Now trying to migrate to chainlink v0.8
I see an OperatorInterface but not a real contract here in develop: https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/interfaces/OperatorInterface.sol
Why isn't the Operator implementation part of the v0.8 ?
If I am including a contract Operator v0.7 in my project, truffle is all confused with versions mismatch.
I couldn't find a resource online about someone deploying a node with v0.8.
How should I go about migrating to v0.8, what should I deploy as an Operator for my node, please?
Solution 1:[1]
The Operator is only implemented in ^0.7. version currently.
You can use Hardhat instead of Truffle, which supports multiple solc versions in a project, and then deploy the Operator using ^0.7 and deploy clients which interact with it in v0.8.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andrej |
