Skip to content

Document new event filters options#610

Merged
DZakh merged 6 commits intomainfrom
dz/event-filters-update
Apr 2, 2025
Merged

Document new event filters options#610
DZakh merged 6 commits intomainfrom
dz/event-filters-update

Conversation

@DZakh
Copy link
Member

@DZakh DZakh commented Apr 2, 2025

No description provided.

@DZakh DZakh requested a review from moose-code April 2, 2025 14:28
@vercel
Copy link

vercel bot commented Apr 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
envio-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 2, 2025 2:28pm


### Field Selection

You can optimize data retrieval by specifying exactly which fields to fetch (this is used to enhance performance, see [Interactive Schema Explorer](#interactive-schema-explorer) section):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified the wording and made Field Selection per event the default one.

Comment on lines +62 to +65
```typescript
import { Greeter, User } from "generated";

// Handler for the NewGreeting event
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved example higher on the page

Comment on lines +158 to +168
HyperIndex provides many features to help you build more powerful and efficient indexers. Read more about these on separate pages:

- Handle Factory Contracts with [Dynamic Contract Registration](/docs/HyperIndex/dynamic-contracts) (with nested factories support)
- Index all ERC20 token transfers with [Wildcard Indexing](/docs/HyperIndex/wildcard-indexing)
- Use [Topic Filtering](/docs/HyperIndex/wildcard-indexing) to ignore irrelevant events
- With [multiple filters for single event](/docs/HyperIndex/wildcard-indexing#multiple-filters-example)
- With [different filters per network](/docs/HyperIndex/wildcard-indexing#different-filters-per-network)
- With [filter by dynamicly registered contract addresses](/docs/HyperIndex/wildcard-indexing#index-all-erc20-transfers-to-your-contract) (eg Index all ERC20 transfers to/from your Contract)
- [Access Contract State](/docs/HyperIndex/contract-state) directly from handlers
- Perform external calls from handlers by following the [IPFS Integration guide](/docs/HyperIndex/ipfs)
- Optimise database access with [Loaders](/docs/HyperIndex/loaders)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added list with more docs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good list

Comment on lines +198 to +203
- `event.block` – Block fields (By default: `number`, `timestamp`, `hash`).
- `event.transaction` – Transaction fields (eg `hash`, `gasUsed`, etc. Empty by default).

:::note
Configure block and transaction fields with [`field_selection`](/docs/HyperIndex/configuration-file#field-selection) in your `config.yaml` file.
:::
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified the part

Comment on lines +257 to 260
<TabItem value="typescript" label="TypeScript">

```javascript
```typescript
const pool = await context.Pool.get(poolId);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made TypeScript the default

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

Comment on lines -225 to +300
import { Greeter, User } from "generated";
The context object also provides a logger that you can use to log messages to the console. Compared to `console.log` calls, these logs will be displayed on our [Hosted Service](/docs/HyperIndex/hosted-service) runtime logs page.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented context.log

Comment on lines +30 to +34
- **[Node.js](https://nodejs.org/en/download/current)** _(v18 or newer recommended)_
- **[pnpm](https://pnpm.io/installation)** _(v8 or newer)_
- **[Docker Desktop](https://www.docker.com/products/docker-desktop/)** _(required to run the Envio indexer locally)_

You'll also need to install the Envio CLI:

```bash
npm i -g envio
```
> **Note:** Docker is specifically required to run your indexer locally. You can skip Docker installation if you plan only to use Envio's hosted service.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed outdated docs

- parentHash
```

Try to use this option sparingly as it can cause redundant Data Source calls and increased credits usage.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!!

Copy link
Member

@moose-code moose-code left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!!! Lots of really good changes

@DZakh DZakh merged commit 7be89c3 into main Apr 2, 2025
2 checks passed
@DZakh DZakh deleted the dz/event-filters-update branch April 2, 2025 15:36
@DenhamPreen DenhamPreen mentioned this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants