Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add EVM indexing using subsquid #1

Merged
merged 46 commits into from
Jul 30, 2024
Merged

Conversation

mj52951
Copy link
Collaborator

@mj52951 mj52951 commented Jul 4, 2024

Added EVM indexing using subsquid. For running it locally, check README.md.

  • When main-init.ts is executed, it fills the database with domains and resources from shared-config
  • When main.ts is executed, it starts indexing the specified domain by calling startEvmProcessing located in evmProcessor.ts. In the forementioned function, configuration of the processor is fetched from getEvmProcessor and indexing function processor.run() is periodically called.

NOTE:

  • While testing it locally and setting the start block, note that indexing is not supported for domains that used to be and are no longer supported (e.g. domain that had domainID: 1). It will cause errors because they're currently not defined in the shared-config-test. Same goes for previously defined resources.
  • Additional services like ofac and monitoringService will be added as part of an other PR

docker-compose.yml Show resolved Hide resolved
src/evmIndexer/evmIndexer.ts Outdated Show resolved Hide resolved
src/evmIndexer/evmIndexer.ts Outdated Show resolved Hide resolved
src/evmIndexer/utils/index.ts Outdated Show resolved Hide resolved
src/evmIndexer/utils/index.ts Outdated Show resolved Hide resolved
src/evmProcessor.ts Outdated Show resolved Hide resolved
src/evmProcessor.ts Outdated Show resolved Hide resolved
src/evmProcessor.ts Outdated Show resolved Hide resolved
src/main.ts Outdated Show resolved Hide resolved
src/model/generated/_transferStatus.ts Show resolved Hide resolved
@mj52951 mj52951 requested a review from mpetrun5 July 9, 2024 07:08
src/main.ts Outdated Show resolved Hide resolved
src/main.ts Outdated Show resolved Hide resolved
src/main.ts Show resolved Hide resolved
envs/.env.sepolia.example Outdated Show resolved Hide resolved
src/evmProcessor.ts Outdated Show resolved Hide resolved
src/evmProcessor.ts Outdated Show resolved Hide resolved
src/main.ts Outdated Show resolved Hide resolved
@mj52951 mj52951 marked this pull request as ready for review July 10, 2024 12:41
@mj52951 mj52951 requested a review from mpetrunic July 15, 2024 12:12
.github/workflows/ci.yaml Outdated Show resolved Hide resolved
.github/workflows/ci.yaml Outdated Show resolved Hide resolved
scripts/start-holesky.sh Outdated Show resolved Hide resolved
src/evmIndexer/evmIndexer.ts Show resolved Hide resolved
src/evmIndexer/evmIndexer.ts Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
.eslintrc.json Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
src/evmIndexer/evmIndexer.ts Outdated Show resolved Hide resolved
src/evmIndexer/utils/index.ts Outdated Show resolved Hide resolved
.github/workflows/ci.yaml Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
DOMAIN_BRIDGE_ADDRESS=
START_BLOCK=
RPC_URL=
SUPPORTED_SUBSTRATE_RPCS=[{"id": 3, "endpoint":"wss://"}, ...]
Copy link
Member

Choose a reason for hiding this comment

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

I'd say have a constants ts file in that case rather than having a JSON object in env variables

src/evmIndexer/utils/index.ts Outdated Show resolved Hide resolved
src/evmIndexer/utils/index.ts Show resolved Hide resolved
@mj52951 mj52951 merged commit d7ed336 into main Jul 30, 2024
2 checks passed
@mj52951 mj52951 deleted the mj52951/add-evm-squid branch July 30, 2024 10:29
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.

4 participants