Skip to content

Minor edits to Data Streams docs #1732

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

Merged
merged 4 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 4 additions & 2 deletions src/content/data-streams/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
section: dataStreams
date: Last Modified
title: "Getting Started with Chainlink Data Streams"
metadata:
linkToWallet: true
excerpt: "Learn the basics for how to get data from Chainlink Data Streams."
whatsnext: {
"Find the list of available stream IDs.": "/data-streams/stream-ids",
Expand All @@ -13,8 +15,8 @@ whatsnext: {
import { Aside, CodeSample } from "@components"
import DataStreams from "@features/data-streams/common/DataStreams.astro"

<Aside type="note" title="Early Access">
Data Streams is available on Arbitrum Mainnet and Arbitrum Goerli in Early Access.{" "}
<Aside type="note" title="Mainnet Early Access">
Chainlink Data Streams is available on Arbitrum Sepolia and in Early Access on Arbitrum Mainnet.{" "}
<a href="https://chainlinkcommunity.typeform.com/datastreams?#ref_id=docs">Contact us</a> to talk to an expert about
integrating Chainlink Data Streams with your applications.
</Aside>
Expand Down
12 changes: 6 additions & 6 deletions src/content/data-streams/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ whatsnext:
import { Aside, ClickToZoom } from "@components"
import button from "@chainlink/design-system/button.module.css"

<Aside type="note" title="Early Access">
Data Streams is available on Arbitrum Mainnet and Arbitrum Goerli in Early Access.{" "}
<Aside type="note" title="Mainnet Early Access">
Chainlink Data Streams is available on Arbitrum Sepolia and in Early Access on Arbitrum Mainnet.{" "}
<a href="https://chainlinkcommunity.typeform.com/datastreams?#ref_id=docs">Contact us</a> to talk to an expert about
integrating Chainlink Data Streams with your applications.
</Aside>

Chainlink Data Streams provides low-latency delivery of market data offchain that you can verify onchain. With Chainlink Data Streams, decentralized applications (dApps) now have on-demand access to high-frequency market data backed by decentralized and transparent infrastructure. When combined with [Chainlink Automation](/chainlink-automation/introduction), Data Streams allows decentralized applications to automate trade execution and mitigate frontrunning.
Chainlink Data Streams provides low-latency delivery of market data offchain that you can verify onchain. With Chainlink Data Streams, decentralized applications (dApps) now have on-demand access to high-frequency market data backed by decentralized and transparent infrastructure. When combined with [Chainlink Automation](/chainlink-automation/introduction), Chainlink Data Streams allows decentralized applications to automate trade execution, mitigate frontrunning, and limit bias or adverse incentives in executing non-user-triggered orders.

<ClickToZoom src="/images/data-streams/data-streams-architecture.webp" />

Expand Down Expand Up @@ -68,13 +68,13 @@ One example of how to use Data Streams is in a decentralized exchange. An exampl
1. A user initiates a trade by confirming an `initiateTrade` transaction in their wallet.
1. The onchain contract for the decentralized exchange responds by emitting a Log Trigger event.
1. The Chainlink Automation upkeep monitors the contract for the event. When Automation detects the event, it runs the `checkLog` function specified in the upkeep contract. The upkeep is defined by the decentralized exchange.
1. The `checkLog` function emits an event called `StreamsLookup`.
1. Data Streams detects the `StreamsLookup` event and returns the requested report in the `checkCallback` function for Chainlink Automation.
1. The `checkLog` function uses a `revert` with a custom error called `StreamsLookup`. This approach aligns with [EIP-3668](https://eips.ethereum.org/EIPS/eip-3668#use-of-revert-to-convey-call-information) and conveys the required information through the data in the `revert` custom error.
1. Chainlink Automation monitors the `StreamsLookup` custom error that triggers Chainlink Data Streams to process the offchain data request. Chainlink Data Streams then returns the requested signed report in the `checkCallback` function for Chainlink Automation.
1. Chainlink Automation passes the report to the Automation Registry, which executes the `performUpkeep` function defined by the decentralized exchange. The report is included as a variable in the `performUpkeep` function.
1. The `performUpkeep` function calls the `verify` function on the Data Streams onchain verifier contract and passes the report as a variable.
1. The verifier contract returns a `verifierResponse` bytes value to the upkeep.
1. If the response indicates that the report is valid, the upkeep executes the user's requested trade. If the response is invalid, the upkeep rejects the trade and notifies the user.

This is one example for how you can use Data Streams and Chainlink Automation in combination, but the systems is highly configurable. You can write your own log triggers to initiate upkeeps on Chainlink Automation for a various array of events. You can configure the `StreamsLookup` to retrieve multiple reports. You can configure the `performUpkeep` function to perform a wide variety of actions using the report.
This is one example of how you can combine Data Streams and Chainlink Automation, but the systems are highly configurable. You can write your own log triggers to initiate upkeeps on Chainlink Automation for a various array of events. You can configure the `StreamsLookup` to retrieve multiple reports. You can configure the `performUpkeep` function to perform a wide variety of actions using the report.

Read the [Getting Started](/data-streams/getting-started) guide to learn how to build your own smart contract that retrieves reports from Chainlink Data Streams.
4 changes: 2 additions & 2 deletions src/content/data-streams/reference/interfaces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ title: "Interfaces"

import { Aside, CodeSample } from "@components"

<Aside type="note" title="Early Access">
Data Streams is available on Arbitrum Mainnet and Arbitrum Goerli in Early Access.{" "}
<Aside type="note" title="Mainnet Early Access">
Chainlink Data Streams is available on Arbitrum Sepolia and in Early Access on Arbitrum Mainnet.{" "}
<a href="https://chainlinkcommunity.typeform.com/datastreams?#ref_id=docs">Contact us</a> to talk to an expert about
integrating Chainlink Data Streams with your applications.
</Aside>
Expand Down
4 changes: 2 additions & 2 deletions src/content/data-streams/reference/report-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ title: "Report Schema Reference"

import { Aside } from "@components"

<Aside type="note" title="Early Access">
Data Streams is available on Arbitrum Mainnet and Arbitrum Goerli in Early Access.{" "}
<Aside type="note" title="Mainnet Early Access">
Chainlink Data Streams is available on Arbitrum Sepolia and in Early Access on Arbitrum Mainnet.{" "}
<a href="https://chainlinkcommunity.typeform.com/datastreams?#ref_id=docs">Contact us</a> to talk to an expert about
integrating Chainlink Data Streams with your applications.
</Aside>
Expand Down
4 changes: 2 additions & 2 deletions src/content/data-streams/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ whatsnext:

import { Aside } from "@components"

<Aside type="note" title="Early Access">
Data Streams is available on Arbitrum Mainnet and Arbitrum Goerli in Early Access.{" "}
<Aside type="note" title="Mainnet Early Access">
Chainlink Data Streams is available on Arbitrum Sepolia and in Early Access on Arbitrum Mainnet.{" "}
<a href="https://chainlinkcommunity.typeform.com/datastreams?#ref_id=docs">Contact us</a> to talk to an expert about
integrating Chainlink Data Streams with your applications.
</Aside>
Expand Down
Loading