Skip to content

Conversation

@mgild
Copy link
Contributor

@mgild mgild commented Oct 12, 2025

This pull request introduces support for a new oracle source, SwitchboardSurge, across the Drift program and its dependencies. It also adds new documentation and tooling for the switchboard-on-demand library, updates dependency versions, and improves configuration for builds and documentation deployment.

SwitchboardSurge Oracle Integration

  • Added a new OracleSource::SwitchboardSurge variant and corresponding logic to parse and use SwitchboardSurge oracle quotes, including price, confidence, and delay calculations in oracle.rs, admin.rs, and perp_market.rs. [1] [2] [3] [4] [5] [6] [7]
  • Updated the switchboard-on-demand dependency to include the new anchor feature for compatibility, and added related dependencies for enhanced functionality. [1] [2]

Documentation and Tooling for switchboard-on-demand

  • Added comprehensive documentation files (README.md, DOCS.md), Firebase hosting configuration (firebase.json), and build scripts (package.json, scripts/compile_docs.ts) to support generating and deploying Rust docs for switchboard-on-demand. [1] [2] [3] [4] [5]
  • Updated .gitignore to include .env and documentation artifacts for better workflow management.
  • Added a rustfmt.toml file to standardize Rust code formatting.

Dependency and Build Configuration Updates

  • Pinned anchor-lang and anchor-spl dependencies to exact versions for reproducible builds, and added ahash as a dependency across several Cargo.toml files. [1] [2] [3] [4]
  • Enabled additional build options such as overflow-checks and set resolver = "2" in the workspace for improved safety and compatibility.
  • Added an Anchor.toml toolchain configuration file specifying Anchor version for local development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant