Data Publishing
Anyone can contribute to publishing updates to destination chains, ensuring a constant stream of data. To participate, use the pull-update-publisher tool. Clone the udf-update-publisher repository and launch the daemon to start streaming updates to destination chains. For this, you will need Git to clone the code and Docker or Go to run it.
Configure
Update the config.yaml
file found in the repositories root directory. Ensure you select the data keys for which you want to secure updates for, set the private key, and optionally set your node URLs.
Below is an example of the configuration file, it can be used to configure: 1. the feeds to listen and push updates for, 2. push parameters (e.g., deviation and heartbeat), and 3. target chain information (i.e., where to push updates to and the publisher private key).
Pull Update Publisher Tool
The pull-update-publisher executable when run, tries to publish updates based on the publisher.updateInterval
interval option, in concrete steps it does the following:
Fetch latest updates for keys specified in the configuration file using the "Retrieve Spotter's Assets in Detail" API endpoint of the Update Provider Service.
Select updates that have either of the following properties:
Latest on-chain update is older than value specified by
publisher.updateThreshold
option in the configuration file.Latest on-chain update value differs by more than (
`publisher.priceDiffThreshold` / 10000 %
) from fetched update value.
Send selected updates to the PullOracle contract.
Update Provider Service API
Last updated
Was this helpful?