Skip to content

Commit 3f4d643

Browse files
authored
Update NEAR subaccount FAQ (#194)
1 parent 66853a4 commit 3f4d643

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pages/en/cookbook/near.mdx

+8-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ dataSources:
7575
- NEAR subgraphs introduce a new `kind` of data source (`near`)
7676
- The `network` should correspond to a network on the hosting Graph Node. On the Hosted Service, NEAR's mainnet is `near-mainnet`, and NEAR's testnet is `near-testnet`
7777
- NEAR data sources introduce an optional `source.account` field, which is a human-readable ID corresponding to a [NEAR account](https://docs.near.org/docs/concepts/account). This can be an account or a sub-account.
78-
- NEAR data sources introduce an optional `source.accounts` field, which contains optional suffixes and prefixes. At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively. The example below would match: `[app|good].*[morning.near|morning.testnet]`. If only a list of prefixes or suffixes is necessary the other field can be omitted.
78+
- NEAR data sources introduce an alternative optional `source.accounts` field, which contains optional suffixes and prefixes. At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively. The example below would match: `[app|good].*[morning.near|morning.testnet]`. If only a list of prefixes or suffixes is necessary the other field can be omitted.
7979

8080
```yaml
8181
accounts:
@@ -253,7 +253,13 @@ Currently, only Block and Receipt triggers are supported. We are investigating t
253253
254254
### Will receipt handlers trigger for accounts and their sub-accounts?
255255
256-
Receipt handlers will only be triggered for the exact match of the named account. More flexibility may be added in the future.
256+
If an `account` is specified, that will only match the exact account name. It is possible to match sub-accounts by specifying an `accounts` field, with `suffixes` and `prefixes` specified to match accounts and sub-accounts, for example the following would match all `mintbase1.near` sub-accounts:
257+
258+
```yaml
259+
accounts:
260+
suffixes:
261+
- mintbase1.near
262+
```
257263

258264
### Can NEAR subgraphs make view calls to NEAR accounts during mappings?
259265

0 commit comments

Comments
 (0)