Skip to content

Commit

Permalink
More concordium examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbayly committed Nov 14, 2023
1 parent 48acc8d commit 409a0b2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/build/manifest/concordium.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,42 @@ import { TransactionSummaryType } from "@concordium/node-sdk";
},
```

Or to filter transactions by their sender:

```ts
import { TransactionSummaryType } from "@concordium/node-sdk";

{
handler: "handleTransaction",
kind: ConcordiumHandlerKind.Transaction,
filter: {
type: TransactionSummaryType.AccountTransaction,
values: {
sender: '4AuT5RRmBwcdkLMA6iVjxTDb1FQmxwAh3wHBS22mggWL8xH6s3',
},
},
},
```

Or to filter events by instigator for a specific contract address:

```ts
import { TransactionEventTag } from "@concordium/node-sdk";

{
handler: "handleTransaction",
kind: ConcordiumHandlerKind.Transaction,
filter: {
type: TransactionEventTag.Updated,
values: {
instigator: '4AuT5RRmBwcdkLMA6iVjxTDb1FQmxwAh3wHBS22mggWL8xH6s3',
address: '6536',
amount: '0',
},
},
},
```

Default runtime mapping filters are an extremely useful feature to decide what block, transaction, transaction event, or special events will trigger a mapping handler.

Only incoming data that satisfies the filter conditions will be processed by the mapping functions. Mapping filters are optional but are highly recommended as they significantly reduce the amount of data processed by your SubQuery project and will improve indexing performance.
Expand Down

0 comments on commit 409a0b2

Please sign in to comment.