Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch CBOR reference links in README #73

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ This function will return a promise which resolves to `true` if deletion is succ

### Building Functions Request CBOR Bytes

Instead of performing the [CBOR encoding for a Functions request on-chain](https://docs.chain.link/chainlink-functions/api-reference/functions#encodecbor) in your Functions consumer contract, it is also possible to generate the CBOR encoding off-chain in order to save gas. Then, the resulting encoded CBOR bytes can be used when making an on-chain request. You can either store the encoded request in a `bytes` storage variable within your consumer contract, or initiate the Functions request by passing the CBOR-encoded request object `bytes` directly into the `_sendRequest()` method which [is inherited from `FunctionsClient.sol`](https://docs.chain.link/chainlink-functions/api-reference/functions-client) .
Instead of performing the [CBOR encoding for a Functions request on-chain](https://docs.chain.link/chainlink-functions/api-reference/functions-request#encodecbor) in your Functions consumer contract, it is also possible to generate the CBOR encoding off-chain in order to save gas. Then, the resulting encoded CBOR bytes can be used when making an on-chain request. You can either store the encoded request in a `bytes` storage variable within your consumer contract, or initiate the Functions request by passing the CBOR-encoded request object `bytes` directly into the `_sendRequest()` method which [is inherited from `FunctionsClient.sol`](https://docs.chain.link/chainlink-functions/api-reference/functions-client) .

Note that when encoding a request off-chain, `args` or `bytesArgs` cannot be added to the request on-chain. This is a limitation of CBOR encoding due to its immutable structure.

Expand Down
Loading