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