Stork
GitHubXStork
  • INTRODUCTION
    • Welcome to Stork
    • Core Concepts
    • How It Works
    • Products
  • Getting Started
    • Becoming a Publisher
    • Becoming a Subscriber
    • Putting Data On-Chain
    • Accessing Data On-Chain
  • API Reference
    • Websocket API
      • Publisher
      • Subscriber
    • REST API
    • Contract APIs
      • EVM
      • Solana / SVM
      • Sui
      • Aptos
      • CosmWasm
    • Chain Pusher Configs
      • Asset Config YAML
    • Publisher Agent Configs
      • Config JSON
      • Keys JSON
  • Resources
    • Asset ID Registry
    • Contract Addresses
      • EVM
      • Solana / SVM
      • Sui
      • Aptos
      • CosmWasm
    • Adapters
    • Public Keys
    • FAQ
Powered by GitBook
On this page
  • Overview
  • YAML Structure
  • Root Key: assets
  • Asset Entry
  • asset_id
  • fallback_period_sec
  • percent_change_threshold
  • encoded_asset_id
  • Example Configuration
  • Usage
Edit on GitHub
  1. API Reference
  2. Chain Pusher Configs

Asset Config YAML

This document describes the structure of the YAML configuration file used to define assets and their associated parameters for the Chain Pusher.

Overview

The asset-config.yaml configuration file contains a root key assets, which is a mapping of asset identifiers (asset_id) to their respective configurations. Each asset configuration includes essential metadata and thresholds required by the program.

YAML Structure

assets:
  <asset_id>:
    asset_id: <string>
    fallback_period_sec: <integer>
    percent_change_threshold: <float>
    encoded_asset_id: <string>

Root Key: assets

  • Type: Object

  • Description: A mapping of asset_id to its configuration. Each entry is an Asset Entry keyed by the asset_id.

Asset Entry

Each asset entry contains the following keys:

asset_id

  • Type: String

  • Description: The plain-text identifier for the asset.

  • Example: BTCUSD

fallback_period_sec

  • Type: Integer

  • Description: The maximum time in seconds between updates if the percent_change_threshold is not met.

  • Example: 60

percent_change_threshold

  • Type: Float

  • Description: The percentage change threshold required to trigger an update.

  • Example: 1.0

encoded_asset_id

  • Type: String

  • Description: The Keccak256 hash of the plain-text asset_id. This is used as a unique, encoded identifier for the asset.

  • Example: 0x7404e3d104ea7841c3d9e6fd20adfe99b4ad586bc08d8f3bd3afef894cf184de

Example Configuration

Below is an example YAML configuration file with a single asset entry:

assets:
  BTCUSD:
    asset_id: BTCUSD
    fallback_period_sec: 60
    percent_change_threshold: 1.0
    encoded_asset_id: 0x7404e3d104ea7841c3d9e6fd20adfe99b4ad586bc08d8f3bd3afef894cf184de

Usage

Last updated 4 months ago

This configuration file is read by the to determine which assets to pull from the aggregator and submit on-chain. Ensure that each asset_id is unique and correctly encoded using the Keccak256 hash to derive the encoded_asset_id. Supported Assets and their IDs are available in the . Misconfiguration can lead to unexpected behavior.

Chain Pusher
Asset ID Registry