Skip to main content

Best practices

Here is a list of items to check out before you deploy your squid for use in production:

  • Make sure that you use batch processing throughout your code. Consider using @belopash/typeorm-store for large projects with extensive entity relations and frequent database reads.

  • Filter your data in the batch handler. E.g. if you request event logs from a particular contract, do check that the address field of the returned data items matches the contract address before processing the data. This will make sure that any future changes in your processor configuration will not cause the newly added data to be routed to your old processing code by mistake.

info

Batch handler data filtering used to be compulsory before the release of @subsquid/[email protected]. Now it is optional but highly recommended.