LogoLogo
  • Entangle
    • Overview
    • Security Audits
  • Universal Interoperability Protocol
    • Overview
    • Architecture
      • Scalability and Network Stability
        • L2 Utility Blockchains
        • Transmitter Groups
      • Security and Consensus Mechanism
      • Finality
      • Execution Latency
      • Compatibility and Interoperability
    • Developer Guides
      • Getting Started
      • Solidity
        • Simple Abstract Messenger Example
        • Deploying Your Custom EVM Protocol
        • Bridging Tokens with UIP
        • Become an EVM Transmitter
      • Solana
        • Simple Abstract Messenger Example
        • Deploying Your Custom Solana Protocol
        • Become a Solana Transmitter
      • Calculate Cross-Chain Transaction Cost
      • Customizable Message Transmission Options
      • How to Debug Sent Messages
      • SDK Setup
      • Revenue Sharing for Transmitters
      • How to Become a Super Transmitter
    • Endpoints
  • Universal Data Feeds
    • Overview
    • Architecture
      • Data Delivery Methods
        • Pull Model
        • Push Model
      • Oracle Contract & User Interaction
    • Developer Guides
      • Custom Data Feeds
      • Fetch Data via Pull Model (PAYG)
        • EVM Smart Contracts
        • Solana Smart Contracts
      • Fetch Data via Pull Model (Subscriptions)
        • EVM Smart Contracts
        • Solana Smart Contracts
      • Fetch Data via Push Model
        • EVM Smart Contracts
        • Solana Smart Contracts
    • User Guides
      • Accessing Feeds
      • Subscribe to a Data Feed
      • Check Subscription
      • Manage Subscription
      • Renew Subscription
    • Data Endpoints
  • Universal Token Standard
    • Overview
    • Architecture
      • Fee Components
    • Developer Guides
      • Manual Deploy
        • Token Deployment Types
        • Create a Custom Token
        • Factory Blueprint Deployment
        • Examples
          • Initial Setup
          • UTS Connector
            • Mint & Burn Connector Scheme
            • Lock & Unlock Connector Scheme
            • Connector Over Native Currency
          • UTS Token
            • Simple Token
            • Token with Messages
      • Bridge SDK
      • Token Verification
      • Fees Calculation & Gas Estimation Logic
      • Estimations
    • User Guides
      • Launch Universal Token
      • Create a Liquidity Pool
      • Expand Existing Token
      • Transfer Liquidity to Connector
      • Bridging
    • Contract Addresses
  • Entangle Interoperable Blockchain
    • Overview
    • Architecture
    • Developer Guides
      • Set up a Validator Node
      • Delegating to Validators
      • Undelegating from Validators
      • Supported Accounts
  • More
    • Media Kit
    • FAQ
    • Report an Issue
    • Become a Partner
Powered by GitBook
On this page
  • Pull Update Publisher Tool
  • Update Provider Service API

Was this helpful?

Export as PDF
  1. Universal Data Feeds
  2. Developer Guides

Data Publishing

Last updated 2 months ago

Was this helpful?

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 and launch the daemon to start streaming updates to destination chains. For this, you will need to clone the code and or to run it.

1

Clone

Begin by cloning the using .

git clone https://github.com/Entangle-Protocol/udf-update-publisher.git
2

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).

finalizeSnapshotUrl: https://udfsnap.ent-dx.com
dataKeys:
  - NGL/USD
  - ETH/USD
  - BTC/USD
  - GAS-ETH
  - GAS-BSC
assets:
  - sourceID: prices-feed1
    dataKeys:
    - NGL/USD
    - ETH/USD
    - BTC/USD
  - sourceID: gas-feed1
    dataKeys:
    - GAS-ETH
    - GAS-BSC
publisher:
  updateInterval: 30 
  updateThreshold: 5m0s
  priceDiffThreshold: 100
networks:
  solana:
  eth_sepolia:
    targetChainUrl: https://ethereum-sepolia-rpc.publicnode.com
    pullOracleAddress: 0x0b2d8Ef1D9104c4Df5C89F00B645Ce8bAa56DeB5
    privateKey: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
  mantle_sepolia:
    targetChainUrl: https://rpc.sepolia.mantle.xyz
    pullOracleAddress: 0x751c47110351806e41ccDA4C181a50edfA6b63E0
    privateKey: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
3

Run

If you're using you can build and run the docker container using the following command:

docker compose -f ./docker/docker-compose.yml up

If you're using you can run the pull-update-publisher tool using the following command:

go run ./cmd/pull-update-publisher

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:

  1. 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.

  2. Select updates that have either of the following properties:

    1. Latest on-chain update is older than value specified by publisher.updateThreshold option in the configuration file.

    2. Latest on-chain update value differs by more than (`publisher.priceDiffThreshold` / 10000 %) from fetched update value.

  3. Send selected updates to the PullOracle contract.

Update Provider Service API

Retrieve Spotters List

Endpoint: GET /spotters

Description: Retrieves a list of spotters, including their IDs, supported assets, and networks.

Retrieve Spotter's Assets in Detail

Endpoint: GET /spotters/{spotterID}

Description: Retrieves a detailed view of a specific spotter's assets.

Parameters:

  • spotterID (string): ID of the spotter.

  • assets (string, query): Comma-separated list of asset keys (e.g., NGL/USD, ETH/USD).

Retrieve Calldata for Specific Network

Endpoint: GET /spotters/{spotterID}/{network}/calldata

Description: Retrieves a detailed view of a specific spotter's assets in calldata format for a particular network.

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).

Response (example in json):

{
  "value": {
    "timestamp": "1234567890",
    "data": "btc/usd_value"
  },
  "merkleRoot": "xxxxxxxxxxxxxxxxxxxxx", // bytes32
  "signatures": ["sig1", "sig2", "..."], // array of Signatures
  "merkleProofs": ["uncle_proof1", "uncle_proof2"] // array of strings
  "key": "btc/usd" // bytes32
}
udf-update-publisher repository
Git
Docker
Go
repository
Git
Docker
Go