For the complete documentation index, see llms.txt. This page is also available as Markdown.

Build And Test Oracle Programs

Build the SEDA starter kit Oracle Program to WASM and run local tests before deploying, so agents can validate behavior without guessing.

Build + test an Oracle Program (Starter Kit PriceFeed)

Authoritative references:

This runbook builds the SEDA starter kit Oracle Program into a WASM artifact and validates it locally before deployment.

Rule: Do not deploy until local tests pass.


0) Requirements

You need:

  • Bun

  • Rust

Alternative:

  • Use the DevContainer workflow referenced in the guide (recommended if you want a predictable environment).

Checkpoint:

  • You can run bun --version and rustc --version.


1) Clone + install

Copy/paste:

Checkpoint:

Expected:

  • repo files are present

  • bun install completes without errors


2) Build to WASM

Copy/paste:

Expected:

  • .wasm artifacts are placed in the build/ directory.

Checkpoint:


3) Local test (required before deploying)

The docs provide a Bun test harness using @seda-protocol/dev-tools to execute WASM locally.

Action:

  • create or verify you have a test file under tests/ that matches the docs snippet

  • ensure it points to the canonical WASM path used in the docs:

    • target/wasm32-wasip1/release-wasm/oracle-program.wasm

Run tests:

Checkpoint:

  • tests pass (exit code 0)

  • output includes expected logs/results for the example


4) Define your input schema now

For PriceFeed examples, docs use symbol pairs like:

  • BTC-USDT

Checkpoint:

  • you can state the exact input format your Oracle Program expects (no guessing).


Next steps

Last updated

Was this helpful?