ChainlinkClientUtils
_Chainlink client refactored into library and all unused functions removed Uses price aggregator facet of multi collat diamond for storage.
Copy of https://github.com/smartcontractkit/chainlink/blob/contracts-v0.5.1/contracts/src/v0.8/ChainlinkClient.sol with only requestCount
changed to unset so as to be inherited by a proxy implementation._
ChainlinkRequested
ChainlinkFulfilled
_getSlot
Returns storage slot to use when fetching storage relevant to library
_getStorage
Returns storage pointer for storage struct in diamond contract, at defined slot
buildChainlinkRequest
Creates a request that can hold additional parameters
Parameters
specId
bytes32
The Job Specification ID that the request will be created for
callbackAddr
address
address to operate the callback on
callbackFunctionSignature
bytes4
function signature to use for the callback
Return Values
[0]
struct Chainlink.Request
A Chainlink Request struct in memory
sendChainlinkRequestTo
Creates a Chainlink request to the specified oracle address
Generates and stores a request ID, increments the local nonce, and uses transferAndCall
to send LINK which creates a request on the target oracle contract. Emits ChainlinkRequested event.
Parameters
oracleAddress
address
The address of the oracle for the request
req
struct Chainlink.Request
The initialized Chainlink Request
payment
uint256
The amount of LINK to send for the request
Return Values
requestId
bytes32
The request ID
setChainlinkToken
Sets the LINK token address
Parameters
_linkErc677
address
The address of the LINK token contract
validateChainlinkCallback
Ensures that the fulfillment is valid for this contract
Use if the contract developer prefers methods instead of modifiers for validation
Parameters
requestId
bytes32
The request ID for fulfillment
recordChainlinkFulfillment
Reverts if the sender is not the oracle of the request. Emits ChainlinkFulfilled event.
Parameters
requestId
bytes32
The request ID for fulfillment