You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `Consumer` is the Radix Engine component that consumes/uses data from the oracle. It make a request to send a certain data consumption request to an explicit oracle component, which also carries some parameter data that can be passed back.
12
+
13
+
###### OracleComponent
14
+
The `oracle` component, which is the hub of the entire architecture, is responsible for logged consumer requests, managing authorizations and revocations to data providers, as well as accepting data pushed by data providers and initiating callbacks to connected consumers while delivering the data they need, such as: prices, contest results, etc.
15
+
16
+
It implements permission management through the badge design pattern, and the address with the specified badge can only push data to the `oracle`.
17
+
18
+
###### DataProvider
19
+
The data provider, which is the functional unit that feeds data from the off-chain data to the on-chain `oracle`, needs to present a specific badge before pushing the data inside the `oracle` component.
20
+
21
+
#### process
22
+
1. Request with callback
23
+
24
+
Spend some `XRD`, call Oracle's `request_price` method, and wait for the callback.
25
+
26
+
2. Oracle request
27
+
3. Feed
28
+
4. Fulfil oracle request
29
+
30
+
The data provider calls `feed_price` to push the price to the `oracle` and trigger a callback.
31
+
32
+
5. callback
33
+
34
+
Callback as requested by the caller of 'request_price`
0 commit comments