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

# E0004

> Pipe configuration — Two event entries can match the same log

An `evmEventDecoder` declares two entries that can match one log: the same `topic0` and the same number
of topics, and no indexed parameter that both entries filter on value lists with no value in common. A
log goes to one entry only, so the other would silently miss it.

Two entries for one event are fine when their filters on one parameter share no value, such as
`{ from: ALICE }` and `{ from: BOB }`. So are entries that share `topic0` but not the topic count, such as
ERC-20 and ERC-721 `Transfer`.

**Fix** — put each overlapping filter in its own `evmEventDecoder()`. Every output then receives all the
logs its filter matches, so a log that fits both filters appears in both outputs.

**Wrong** — a transfer from Alice to Bob matches both entries:

```ts theme={"system"}
evmEventDecoder({
  range: { from: 'latest' },
  events: {
    fromAlice: { event: erc20.events.Transfer, params: { from: ALICE } },
    toBob: { event: erc20.events.Transfer, params: { to: BOB } }, // → E0004
  },
})
```

**Right** — one decoder per filter:

```ts theme={"system"}
evmPortalStream({
  id: 'transfers',
  portal: '...',
  outputs: {
    fromAlice: evmEventDecoder({
      range: { from: 'latest' },
      events: { transfers: { event: erc20.events.Transfer, params: { from: ALICE } } },
    }),
    toBob: evmEventDecoder({
      range: { from: 'latest' },
      events: { transfers: { event: erc20.events.Transfer, params: { to: BOB } } },
    }),
  },
})
```


## Related topics

- [Error reference](https://docs.sqd.dev/en/sdk/pipes-sdk/reference/errors.md)
- [evmEventDecoder](https://docs.sqd.dev/en/sdk/pipes-sdk/evm/reference/utility-components/evm-decoder.md)
- [Changelog](https://docs.sqd.dev/changelog.md)


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