Switchboard

Switchboard On-Demand is designed to be a cost optimized, low latency and high security data solution for blockchain applications.

Switchboard on Eclipse works the same way as it does on Solana, except you'll have to pass in an extra parameter and there are a few gotchas. For full documentation, visit Switchboard.

Program ID

Network
Program address

Eclipse Mainnet

SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv

Eclipse Devnet

SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv

Getting Started

Start from Integrating On-Chain (SVM). You can add the network and the chain settings in the params for fetchUpdateIx. This will route the requests to the correct Switchboard oracles and map the data back to the target chain (Eclipse).

Copy

const provider = ...

// Initialize the program state account
const idl = (await anchor.Program.fetchIdl(new PublicKey("SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv"), provider))!;
const program = new anchor.Program(idl, provider);

// Get the Pull Feed - (pass in the feed pubkey)
const pullFeed = new PullFeed(program, new PublicKey(...));

// Get the update for the pull feed
const [pullIx, responses, _, luts] = await pullFeed.fetchUpdateIx({ 
      crossbarClient: crossbar,
      chain: "eclipse",
      network: "mainnet",
});

For more info on Switchboard, check out the official docs.

Last updated