Skip to content

Commit

Permalink
Merge pull request #344 from subsquid/misc-fixes-by-abernatskiy-dec9
Browse files Browse the repository at this point in the history
Misc fixes by abernatskiy dec9
  • Loading branch information
abernatskiy authored Dec 8, 2023
2 parents 0395186 + 7b407f2 commit f86b71a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/sdk/how-to-start/cli-cheatsheet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ sqd clean Delete all build artifacts

### Running the squid
:::info
Both `sqd up` and `sqd down` assume `docker-compose` is installed and the `docker` deamon is running. Modify the definitions
in `commands.json` accordingly if `docker compose` (the docker command) should be used instead.
Both `sqd up` and `sqd down` assume that the `docker compose` command is supported and the `docker` deamon is running. Modify the definitions
in `commands.json` accordingly if `docker-compose` should be used instead.
:::

```
sqd up Start a local PG database
sqd down Drop the local PG database
sqd run [PATH] Run all the processors defined in squid.yaml locally
sqd run [PATH] Run all the services defined in squid.yaml locally
sqd serve Start the GraphQL server
sqd serve:prod Start the GraphQL API server with caching and limits
```
Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/how-to-start/squid-development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Suppose you want to create a BigQuery dataset with Kusama native tokens transfer
Although it is possible to [compose a squid from individual packages](/sdk/how-to-start/squid-from-scratch), in practice it is usually easier to start from a template.

```mdx-code-block
<Tabs>
<Tabs queryString="template-tech">
<TabItem value="evm" label="EVM">
<details>
<summary>Templates for the PostgreSQL+GraphQL data destination</summary>
Expand Down
8 changes: 6 additions & 2 deletions docs/sdk/tutorials/batch-processor-in-action.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ import TabItem from '@theme/TabItem';
<TabItem value="evm" label="EVM">
```

An end-to-end idiomatic usage of `EvmBatchProcessor` can be inspected in the [gravatar template repository](https://github.com/subsquid/gravatar-squid) and also learned from more elaborate [examples](/sdk/examples).
An end-to-end idiomatic usage of `EvmBatchProcessor` can be inspected in the [gravatar template repository](https://github.com/subsquid-labs/gravatar-squid) and also learned from more elaborate [examples](/sdk/examples).

In order to illustrate the concepts covered in the [development guide](/sdk/how-to-start/squid-development), here we highlight the key steps, put together a processor configuration and a data handling definition.

**Pre-requisites:** NodeJS, Git, Docker, [Squid CLI](/squid-cli/installation), any of the [EVM templates](/sdk/how-to-start/squid-development/?template-tech=evm#templates).

## 1. Model the target schema and generate entity classes

Create or edit `schema.graphql` to define the target entities and relations. Consult [the schema reference](/sdk/reference/schema-file).
Expand All @@ -32,7 +34,7 @@ sqd migration:generate

## 2. Generate Typescript ABI modules

Use [`evm-typegen`[(/sdk/reference/typegen/state-queries) to generate the facade classes, for example like this:
Use [`evm-typegen`](/sdk/resources/tools/typegen/) to generate the facade classes, for example like this:
```bash
npx squid-evm-typegen src/abi 0x2E645469f354BB4F5c8a05B3b30A929361cf77eC#Gravity --clean
```
Expand Down Expand Up @@ -136,6 +138,8 @@ An end-to-end idiomatic usage of `SubstrateBatchProcessor` can be inspected in t

Here we highlight the key steps and put together a configuration and a data handling definition to illustrate the concepts covered in the [squid development guide](/sdk/how-to-start/squid-development).

**Pre-requisites:** NodeJS, Git, Docker, [Squid CLI](/squid-cli/installation), any of the [Substrate templates](/sdk/how-to-start/squid-development/?template-tech=substrate#templates).

## 1. Set up the processor

See [Setup section](/sdk/reference/processors/substrate-batch) for more details.
Expand Down

0 comments on commit f86b71a

Please sign in to comment.