> For the complete documentation index, see [llms.txt](https://docs.seda.xyz/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.seda.xyz/home/for-agents/agent-modules/build-and-test-oracle-programs.md).

# Build And Test Oracle Programs

## Build + test an Oracle Program (Starter Kit PriceFeed)

**Canonical URL:** [**https://docs.seda.xyz/home/for-agents/agent-modules/build-and-test-oracle-programs**](https://docs.seda.xyz/home/for-agents/agent-modules/build-and-test-oracle-programs)

Authoritative references:

* Getting Started: Price Feed: <https://docs.seda.xyz/home/for-developers/seda-onchain/build-an-oracle-program-on-core/getting-started-price-feed>
* Accessing a Public API (includes test harness): <https://docs.seda.xyz/home/for-developers/define-your-data-source/accessing-a-public-api>

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:

```bash
git clone https://github.com/sedaprotocol/seda-starter-kit.git
cd seda-starter-kit
bun install
```

Checkpoint:

```
ls
```

Expected:

* repo files are present
* `bun install` completes without errors

***

### 2) Build to WASM

Copy/paste:

```
bun run build
```

Expected:

* `.wasm` artifacts are placed in the `build/` directory.

Checkpoint:

```
ls -la build || true
find . -maxdepth 6 -name "*.wasm" | head
```

***

### 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:

```
bun test
```

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

* Wallet + tokens: <https://docs.seda.xyz/home/for-agents/agent-modules/wallets-and-tokens>
* Deploy + post Data Request: <https://docs.seda.xyz/home/for-agents/agent-modules/deploy-oracle-program-upload-to-seda-network> and <https://docs.seda.xyz/home/for-agents/agent-modules/execute-on-seda-fast>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.seda.xyz/home/for-agents/agent-modules/build-and-test-oracle-programs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
