Stork is implemented as a pull oracle. Stork continuously aggregates data from our decentralized publisher network, verifies that data, audits it, then makes that data available. This data can then be pulled onto TAC via the Stork contract, and then used by any EVM application on TAC. For more information, please refer to How It Works.
The easiest way to pull data from Stork and make it available onchain is to use the Stork Chain Pusher and configure it to push any relevant assets to TAC. The Stork Chain Pusher will automatically listen to the Stork aggregator websocket, and push that data to the Stork contract on TAC whenever certain conditions are met. The following conditions are supported and can be combined:
Percentage Change: Push data when the price changes by a certain percentage.
Time Interval: Push data at a regular interval.
For more information on how to use the Stork Chain Pusher, please refer to Putting Data onchain.
Reading from the Stork contract is as simple as calling its getTemporalNumericValueV1(bytes32 id) function from your contract. This function takes an encoded asset ID of the relevant asset and returns the latest value for that asset in the form of a TemporalNumericValue struct, which contains an integer value (multiplied by 10^18 for precision) and a UNIX nanosecond timestamp.For more information on how to read data from the Stork contract, please refer to the EVM Contract API.
Stork supports a wide range of assets and asset classes. For a full list of supported assets and their encoded asset IDs, please refer to Supported Assets.