NODE OPERATORS Overview Running a Chainlink Node Fulfilling Requests Run an Ethereum Client Performing System Maintenance Connecting to a Remote Database Configuration Variables Enabling HTTPS Connections Best Security and Operating Practices Best Practices for Nodes on AWS Miscellaneous
ORACLE JOBS Migrating to v2 Jobs Jobs Cron Direct Request Flux Monitor Keeper Off-chain Reporting Webhook Tasks HTTP Bridge JSON Parse CBOR Parse ETH ABI Decode ETH ABI Decode Log ETH ABI Encode ETH Call ETH Tx Multiply Divide Any Mean Median Mode Sum
CBOR Parse Task
CBOR Parse tasks parse a CBOR payload, typically as part of a Direct Request workflow. In Direct Request, a user makes an on-chain request using a ChainlinkClient
contract, which encodes the request parameters as CBOR. See below for an example.
Parameters
data
: a byte array containing the CBOR payload.
Outputs
A map containing the request parameters. Parameters can be individually accessed using $(dot.accessors)
.
Example
// First, we parse the request log and the CBOR payload inside of it
decode_log [type="ethabidecodelog"
data="$(jobRun.logData)"
topics="$(jobRun.logTopics)"
abi="SomeContractEvent(bytes32 requestID, bytes cborPayload)"]
decode_cbor [type="cborparse"
data="$(decode_log.cborPayload)"]
// Then, we use the decoded request parameters to make an HTTP fetch
fetch [type="http" url="$(decode_cbor.fetchURL)" method="get"]
parse [type="jsonparse" path="$(decode_cbor.jsonPath)" data="$(fetch)"]
// ... etc ...
See the Direct Request page for a more comprehensive example.