Skip to main content

Dialed in with Switchboard: April 18, 2022

· 2 min read
gallynaut

Dialed in with Switchboard is a weekly newsletter about the various updates with Switchboard.

And we’re back with another edition of Dialed in with Switchboard. Thank you to everyone we met at the Solana hacker house. The speed at which this developer ecosystem is growing can only be witnessed in person.

And also thank you to all of the Riptide hackathon submissions that were built with Switchboard. It was an impressive lineup and we’re excited to see how they grow within the Solana ecosystem.

Anchor Fetch

Project Serum’s Anchor framework provides a common Interface Design Language (IDL) which specifies how programs written in Anchor store data on-chain and serialize instructions. The IDL gives developers a quick way to hook into programs without needing to integrate the program’s specific API. In fact, you can view any Anchor program account using the Solana explorer and visually view the on-chain data.

Note: Switchboard V2 is written in Anchor and you can view its IDL at docs.switchboard.xyz/idl.

With that said, Switchboard has now added support to fetch any Anchor account with its newly added AnchorFetchTask. The publisher specifies the program ID and account address, and the Switchboard oracle will return the JSON representation of the parsed account data. This can then be chained with a JsonParseTask to return a single value from any Anchor account. This new feature allows developers to build complex oracles based on any Anchor account field.

Defi Kingdoms

Switchboard has also added the DefiKingdomsTask to allow publishers to build data feeds that return the swap price of a token on DeFi Kingdoms. DeFi Kingdoms is a DeFi game built on ETH with in-game tokens and NFTs that players can trade.

Conclusion

Oracles will need to update to dev-v2–4–12–22h to leverage these new tasks.

Building on Solana? Please find us on telegram so we can connect and build together. We’re always looking for new teams that can leverage Switchboard and are happy to build new task types to support your needs.