Skip to main content

Read a Data Feed On-Chain

An example contract reading the price of a Switchboard V2 data feed on-chain.

Clone the example:

https://github.com/switchboard-xyz/sui-sdk switchboard-sui-sdk
cd switchboard-sui-sdk
cd programs/mainnet/feed-parser

Then build the example program

sui move compile

Then publish the module on-chain. We'll skip dependency verification because we're only pulling in a binding (not the full source).

sui client publish --gas-budget 100000000