> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Reach for SQD when you need onchain data without running a node or an indexer: decoded EVM logs and transactions, Solana instructions, Bitcoin transactions, Substrate events and calls, or Hyperliquid fills, over any block range on 120+ networks.
> To query directly, POST to https://portal.sqd.dev/datasets/{dataset}/stream. The full API is described at https://docs.sqd.dev/openapi.json, and responses to the stream endpoints are JSON Lines.
> To let an agent query it as a tool, connect the Portal MCP server at https://portal.sqd.dev/mcp.
> Every page on this site is available as Markdown by appending .md to its URL.

# Run the Ponder and Portal example

> Run a Ponder indexer that uses SQD Portal for its historical backfill.

The portal-ponder repository includes a bounded Euler V2 indexer that runs without an environment file. It uses the public Portal for history and a public archive RPC for `readContract` calls.

You need Node.js 18.14 or newer and npm.

<Steps>
  <Step title="Clone the repository">
    ```bash theme={"system"}
    git clone https://github.com/subsquid-labs/portal-ponder.git
    cd portal-ponder/examples/euler-subgraph
    ```
  </Step>

  <Step title="Install and run">
    ```bash theme={"system"}
    npm install
    npm run dev
    ```

    Wait for Ponder to report that indexing is complete. Keep the process running for the next step.
  </Step>

  <Step title="Check the indexed rows">
    In another terminal, run:

    ```bash theme={"system"}
    npm run summary
    ```

    The repository's verified demo result is:

    ```text theme={"system"}
    39 vaults · 504 deposits · 163 withdraws · 185 borrows · 35 repays · 0 liquidations · 900 vault status updates · 887 actions indexed from the SQD Portal
    ```

    You can also open `http://localhost:42069/graphql` while the development server is running.
  </Step>
</Steps>

## What to inspect

The example's `ponder.config.ts` contains the integration point:

```ts theme={"system"}
import { createConfig } from "@subsquid/ponder";

export default createConfig({
  chains: {
    mainnet: {
      id: 1,
      rpc: process.env.PONDER_RPC_URL_1 ?? "https://eth.drpc.org",
      portal:
        process.env.PORTAL_URL_1 ??
        "https://portal.sqd.dev/datasets/ethereum-mainnet",
    },
  },
});
```

The factory, schema, handlers, `readContract` calls, and GraphQL API use normal Ponder APIs. The repository pins a tested `@subsquid/ponder` release in the example's `package.json`.

The public Portal and public RPC are shared services. Use your own RPC and dedicated Portal capacity for sustained workloads. To update an existing project, continue with [Migrate a Ponder app](/en/sdk/alternative-clients/ponder/guides/migrate).


## Related topics

- [Ponder and Portal examples](/en/sdk/alternative-clients/ponder/examples.md)
- [Use Portal with Ponder](/en/sdk/alternative-clients/ponder.md)
- [Ponder benchmarks and validation](/en/sdk/alternative-clients/ponder/benchmarks-and-validation.md)
- [Configure Ponder with Portal](/en/sdk/alternative-clients/ponder/configuration.md)
- [Migrate a Ponder app to Portal](/en/sdk/alternative-clients/ponder/guides/migrate.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.