Skip to content

Commit 93d97b9

Browse files
committed
tiny edits
1 parent baa3b10 commit 93d97b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

website/pages/en/developing/creating-a-subgraph.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ graph init \
6666
The following command initializes a new project from an example subgraph:
6767

6868
```sh
69-
--studio <SUBGRAPH_SLUG> --from-example=example-subgraph
69+
graph init--studio <SUBGRAPH_SLUG> --from-example=example-subgraph
7070
```
7171

7272
- The [example subgraph](https://github.com/graphprotocol/example-subgraph) is based on the Gravity contract by Dani Grant, which manages user avatars and emits `NewGravatar` or `UpdateGravatar` events whenever avatars are created or updated.
7373

7474
- The subgraph handles these events by writing `Gravatar` entities to the Graph Node store and ensuring these are updated according to the events.
7575

76-
### Add new `dataSources` to an existing subgraph
76+
## Add new `dataSources` to an existing subgraph
7777

7878
Since `v0.31.0`, the Graph CLI supports adding new `dataSources` to an existing subgraph through the `graph add` command:
7979

@@ -88,9 +88,9 @@ Options:
8888
--network-file <path> Networks config file path (default: "./networks.json")
8989
```
9090

91-
#### Specifics
91+
### Specifics
9292

93-
The `add` command will fetch the ABI from Etherscan (unless an ABI path is specified with the `--abi` option) and creates a new `dataSource`, similar to how the `graph init` command creates a `dataSource` `--from-contract`, updating the schema and mappings accordingly. This allows you to index implementation contracts from their proxy contracts.
93+
The `graph add` command will fetch the ABI from Etherscan (unless an ABI path is specified with the `--abi` option) and creates a new `dataSource`, similar to how the `graph init` command creates a `dataSource` `--from-contract`, updating the schema and mappings accordingly. This allows you to index implementation contracts from their proxy contracts.
9494

9595
- The `--merge-entities` option identifies how the developer would like to handle `entity` and `event` name conflicts:
9696

0 commit comments

Comments
 (0)