Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion docs/oev-searchers/in-depth/data-feeds/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ hardcoded in the OEV proxies of the dApp.
The ID has no meaning other than to group proxies of the same dApp together.

Searchers can derive the dApp ID from the information provided in the
[OEV dApps catalog](/oev-searchers/in-depth/#oev-dapps). Searchers can use [`unsafeComputeDappId`](https://github.com/api3dao/contracts/blob/52109d0d285d3ac485a2f0ed68bd7799e75a9722/src/proxy.ts#L57) from the `@api3/contracts` package.
[OEV dApps catalog](/oev-searchers/in-depth/#oev-dapps).

#### Programmatically

Searchers can use [`unsafeComputeDappId`](https://github.com/api3dao/contracts/blob/52109d0d285d3ac485a2f0ed68bd7799e75a9722/src/proxy.ts#L57) from the `@api3/contracts` package.

::: info ℹ️ Example

Expand All @@ -202,6 +206,31 @@ const dTrinityDappId = unsafeComputeDappId('dtrinity', 252);

:::

#### Using the CLI

Alternatively, you can use the `compute-dapp-id` command from the `@api3/contracts` package.

::: info ℹ️ Example

For the same example as above, run the following command:

```sh
npx @api3/contracts@latest compute-dapp-id \
--dapp-alias dtrinity \
--chain-id 252
```

The command will output:

```
dApp alias: dtrinity
chain: Fraxtal

• dApp ID: 16210721173577624589952893185091679941657223823840386808143855919126917477566
```

:::

### dApp sources

Searchers need to know the proxy address and the underlying dAPI name used by
Expand Down