Skip to content

Commit 6c5c4bd

Browse files
committed
clarifications
1 parent 67439e7 commit 6c5c4bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/data-streams/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ One example of how to use Data Streams is in a decentralized exchange. An exampl
6868
1. A user initiates a trade by confirming an `initiateTrade` transaction in their wallet.
6969
1. The onchain contract for the decentralized exchange responds by emitting a Log Trigger event.
7070
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.
71-
1. The `checkLog` function uses a `revert` with a custom error type called `StreamsLookup`. This approach, aligning with [EIP-3668](https://eips.ethereum.org/EIPS/eip-3668#use-of-revert-to-convey-call-information), conveys necessary information through the data in the `revert` custom error.
72-
1. The `StreamsLookup` custom error triggers Chainlink Data Streams to process the offchain data request and returns the requested signed report in the `checkCallback` function for Chainlink Automation.
71+
1. The `checkLog` function uses a `revert` with a custom error called `StreamsLookup`. This approach, aligning with [EIP-3668](https://eips.ethereum.org/EIPS/eip-3668#use-of-revert-to-convey-call-information), conveys necessary information through the data in the `revert` custom error.
72+
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.
7373
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.
7474
1. The `performUpkeep` function calls the `verify` function on the Data Streams onchain verifier contract and passes the report as a variable.
7575
1. The verifier contract returns a `verifierResponse` bytes value to the upkeep.

0 commit comments

Comments
 (0)