Repository navigation
Add guide for indexing Etherlink EVM contracts with Envio - #463
Jordy-Baby wants to merge 2 commits into
Conversation
Adds a HyperIndex guide next to the The Graph guide, adds it to the sidebar and links to it from the data indexers page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@Jordy-Baby is attempting to deploy a commit to the Trili Tech Team on Vercel. A member of the Team first needs to authorize it. |
| ``` | ||
|
|
||
| When the CLI asks whether you want to add another contract, select `I'm finished`. | ||
| If the `ENVIO_API_TOKEN` environment variable is not set, the CLI asks you to create a new API token or add an existing one to the project's `.env` file. |
There was a problem hiding this comment.
Can you specify what are the required rights for this token, so that one can create it manually instead of relying on envio.dev to create it on behalf of one's github account?
My bad, I thought it's trying to create a Github access token for Envio, but it's just creating an Envio API token, using one's Github account. So the question becomes: is there another way of creating an Envio token without authorizing it to use one's Github account? Knowing that some developers might be reluctant to grant this permission.
There was a problem hiding this comment.
hey @NicNomadic, thanks for testing this :)
right now the Envio dashboard only supports signing in with GitHub, so there isn't another way to create the token yet
I'll pass the feedback on to our team. lmk if you require anything further on our end
|
Thanks for this nice contribution. I'm waiting for the answer in the thread above to continue testing your tutorial. |
| When the CLI asks whether you want to add another contract, select `I'm finished`. | ||
| If the `ENVIO_API_TOKEN` environment variable is not set, the CLI asks you to create a new API token or add an existing one to the project's `.env` file. | ||
|
|
||
| The CLI generates the project, runs code generation and installs the dependencies: |
There was a problem hiding this comment.
I tried nevertheless with a fresh Github account but I was stuck when doing pnpx envio init:
-
First, you should mention which kind of token to create. I assumed HyperSync, was it rather HyperRPC?
-
I had some warning when using pnm 11.10.0 (WARN] The "workspaces" field in package.json is not supported by pnpm. Create a "pnpm-workspace.yaml" file instead.), which disappeared when I upgraded to pnpm 12.8.1. Should you mention a minimal pnpm version?
-
The script ultimately fails during installing dependencies, here is the trace.
Installing dependencies with pnpm...
...
[WARN] Issues with peer dependencies found. Run "pnpm peers check" to list them.
dependencies:- envio 3.12.1
devDependencies: - @types/node 24.12.2
- typescript 6.0.3
- vitest 4.1.0
Error: ERR_PNPM_IGNORED_BUILDS
× installing dependencies
╰─▶ Ignored build scripts: esbuild@0.27.7
help: Run "pnpm approve-builds" to pick which dependencies should be allowed
to run scripts.
[11:41:11.766] ERROR: Failed installing project dependencies: pnpm install exited with code 1
- envio 3.12.1
There was a problem hiding this comment.
Hey @NicNomadic, thanks for running through it with a fresh account, this is really useful.
- It's a HyperSync token, the free one on the HyperSync tokens page. HyperRPC is a separate product and isn't needed here. The prerequisites now say that and link the steps.
- I couldn't reproduce the workspaces warning on pnpm 11.10.0, and the generated
package.jsonhas noworkspacesfield, so I've left out a minimum pnpm version. - Reproduced on pnpm 11.10.0 and 12.8.1. pnpm 11 and later stop the install until the esbuild build script is approved, where pnpm 10 only warns. The project files are already generated at that point, so running
pnpm approve-builds esbuildin the project folder gets past it. I've added that step to the guide and tested the rest of it on pnpm 12.8.1 (pnpm test,pnpm devand the queries). There's also a fix open for the CLI at Approve the esbuild build script in pnpm projects created by envio init enviodev/hyperindex#1680
The update is pushed. Lmk if you require anything further on our end.
There was a problem hiding this comment.
Thanks for the answers 1 and 2.
As for 3, I did try pnpm approve-builds as suggested by the tool but I got There are no packages awaiting approval. I can try this again tomorrow if anything has changed.
There was a problem hiding this comment.
I tried again right now, still no approvals pending, and running pnpx envio init again after that gets stuck the same. Let me know when the fix lands (and what should I update, if any) so I can retest it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hey @NicNomadic, thanks again for getting the Envio listing merged. This adds an "Indexing contracts with Envio" guide next to the existing Graph guide.
docs/evm/developing/indexing-envio.md, added tosidebars.jsright afterindexing-graph0xc9B53AB2679f573e480d01e0f49e2B5CFB7a3EAb) on Etherlink Mainnet with HyperIndex and HyperSyncEvery command, config snippet and output in the guide comes from a real run on Etherlink Mainnet, and the sample query results match the on-chain logs.
npm run buildpasses and the page shows in the sidebar.Lmk if you require anything further on our end.