Skip to content

Commit

Permalink
fix: fixed wordings
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyasmohd committed Jun 14, 2024
1 parent e3406aa commit 792b41d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/pages/en/developing/creating-a-subgraph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ calls:
ERC20.poolInfo: ERC20[event.address].getPoolInfo(event.params.to)
```

In the example above, the `ERC20.poolInfo` is declared `eth_call`. The text before colon(`ERC20.poolInfo`) is the label for this `eth_call` which is used when logging errors. The text after colon(`ERC20[event.address].getPoolInfo(event.params.to)`) is the actual `eth_call` that will be executed which is in the form of `Contract[address].function(arguments)`. The `address` and `arguments` can be replaced with actual values or variables which will be available when executing the handler.
In the example above, the `ERC20.poolInfo` is declared `eth_call`. The text before colon(`ERC20.poolInfo`) is the label for this `eth_call` which is used when logging errors. The text after colon(`ERC20[event.address].getPoolInfo(event.params.to)`) is the actual `eth_call` that will be executed which is in the form of `Contract[address].function(arguments)`. The `address` and `arguments` can be replaced with variables which will be available when executing the handler.

When declared `eth_calls` are used, `graph-node` caches the results in the memory and when the `eth_call` is triggered inside handlers, it fetches the result from the cache instead of making an actual RPC call.

Expand Down

0 comments on commit 792b41d

Please sign in to comment.