Publishing Updates to Destination Chains
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 pull-oracle-publisher repo and launch the daemon to start streaming updates to destination chains.
Clone repo - `git clone
Change config.yaml in repo’s root, select data keys for which you want to secure updates, set private key, optionally set your node URLs.
Run pull-oracle-publisher cmd - `go run ./cmd/pull-update-publisher`. Or build and run docker container - `docker compose -f ./docker/docker-compose.yml up`
The pull-update-publisher executable when run, tries to publish update on `publisher.updateInterval` interval option, in concrete steps it does the following:
Fetch latest updates for keys in the config from finalized-data-snap(spotter's assets list in calldata in Finalized Data API)
Select updates that has either of the following properties:
Latest on-chain update is older than value specified by `publisher.updateThreshold` option in the config
Latest on-chain update value differs by more than (`publisher.priceDiffThreshold` / 10000 %) from fetched update value.
Send selected updates to the PullOracle contract.
Finalized Data API
1. Retrieve Spotters List
Endpoint: GET /spotters
Description: Retrieves a list of spotters, including their IDs, supported assets, and networks.
2. Retrieve Spotter's Assets in Detail
Endpoint: GET /spotters/{spotterID}
Parameters:
spotterID
(string): ID of the spotter.assets
(string, query): Comma-separated list of asset keys (e.g.,NGL/USD, ETH/USD
).
Description: Retrieves a detailed view of a specific spotter's assets.
3. Retrieve Calldata for Specific Network
Endpoint: GET /spotters/{spotterID}/{network}/calldata
Parameters:
spotterID
(string): ID of the spotter.network
(string): Blockchain network name.assets
(string, query): Comma-separated list of asset keys (e.g.,NGL/USD, ETH/USD
).
Description: Retrieves a detailed view of a specific spotter's assets in calldata format for a particular network.
Response example in json:
Last updated