You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/1.getting-started/6.datasources.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Index datasources, ones that can be attached to a specific index, are prefixed w
22
22
23
23
## Connection settings
24
24
25
-
All datasources now share the same code under the hood to communicate with underlying APIs via HTTP. Their configs have an optional section `http` to configure connection settings. You can use it to set timeouts, retry policies, and other parameters.
25
+
All datasources share the same code under the hood to communicate with underlying APIs via HTTP. Their configs have an optional section `http` to configure connection settings. You can use it to set timeouts, retry policies, and other parameters.
26
26
27
27
Each datasource kind has its defaults. Usually, there's no reason to alter these settings unless you use self-hosted instances. In the example below, default values are shown:
Copy file name to clipboardExpand all lines: docs/1.getting-started/7.indexes.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,8 @@ Index is a primary DipDup entity connecting the inventory and data handling rule
9
9
10
10
Multiple indexes are available for different workloads. Every index is linked to a specific datasource and provides a set of handlers for different kinds of data. Use this table to choose the right index for the task:
Copy file name to clipboardExpand all lines: docs/2.indexes/5.tezos_tzkt_operations.md
+46-25Lines changed: 46 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: "Operation index allows you to query only operations related to you
4
4
network: "tezos"
5
5
---
6
6
7
-
<!-- markdownlint-disable first-line-h1 -->
7
+
<!-- markdownlint-disable no-inline-html-->
8
8
<!-- TODO: add images to the side <div class="float-img">
9
9
<img src="../../assets/operation-bcd.png" alt="Operation group in BCD explorer">
10
10
<img src="../../assets/operation-config.png" alt="`operation` index config">
@@ -16,10 +16,10 @@ Operation index allows you to query only operations related to your dapp and mat
16
16
17
17
## Handlers
18
18
19
-
Each operation handler contains two required fields:
19
+
Each operation handler config item contains two required fields:
20
20
21
-
*`callback` — a name of async function with a particular signature; DipDup will search for it in `{{ project.package }}.handlers.<callback>` module.
22
-
*`pattern` — a non-empty list of items that need to be matched.
21
+
-`callback` — a name of async function with a particular signature; DipDup will search for it in `{{ project.package }}.handlers.<callback>` module.
22
+
-`pattern` — a non-empty list of items that need to be matched.
23
23
24
24
```yaml [dipdup.yaml]
25
25
indexes:
@@ -37,26 +37,47 @@ indexes:
37
37
38
38
You can think of the operation pattern as a regular expression on a sequence of operations (both external and internal) with a global flag enabled (there can be multiple matches). Multiple operation parameters can be used for matching (source, destination, etc.).
39
39
40
-
You will get slightly different callback argument types depending on whether pattern item is typed or not. If so, DipDup will generate the dataclass for a particular entrypoint/storage, otherwise you will have to handle untyped parameters/storage updates stored in `TzktOperationData` model.
40
+
When the operation group matches the pattern, DipDup creates arguments for the callback function and invokes it.
| `originated_contract.code_hash` | Originations of all contracts having the same code. | ✅ | ✅ |
48
-
| `source.address` | Special cases only. This filter is very slow and doesn't support strict typing. Usually, `originated_contract.code_hash` suits better. | ⚠ | ❌ |
49
-
| `source.code_hash` | Currently not supported. | ❌ | ❌ |
44
+
You will get slightly different callback argument types depending on whether the pattern item is typed or not. If so, DipDup will generate the dataclass for a particular entrypoint/storage, otherwise, you will have to handle untyped parameters/storage updates stored in `TzktOperationData` model.
50
45
51
-
## Matching transactions
46
+
## Applying filters
47
+
48
+
In pattern items, you can specify filters to narrow down the search. For example, you can match only operations sent to a particular address. Each operation type has its own set of filters.
| `originated_contract.code_hash` | Originations of all contracts having the same code. | 🟢 | 🟢 |
56
+
| `source.address` | Originations sent by address. Special cases only, see below. | 🟡 | 🔴 |
57
+
| `source.code_hash` | Not supported. | 🔴 | 🔴 |
58
+
59
+
Filtering originations by `source.address` is very slow and strict typing is not supported. For most cases `originated_contract.code_hash` suits better.
We're glad to announce DipDup 7.2! This release brings better support for Etherlink smart rollups and a bunch of minor improvements.
8
+
We're glad to announce DipDup 7.3! This release brings better support for Etherlink smart rollups and a bunch of minor improvements.
9
9
10
10
## Indexing `sr_execute` operations on Tezos
11
11
12
+
We continue to improve support for Etherlink smart rollups introduced in 7.2. In case you've missed it, Etherlink is an EVM-compatible smart rollup on Tezos, which prioritizes fair ordering of transactions, low latency and security. They are WASM applications, providing versatility in what language you write them in.
13
+
14
+
Now you can index `sr_execute` operations with DipDup. This is a special operation created when rollup outbox messages are executed. You can filter them by `sr1` source/destination address. `demo_etherlink` demo project was updated to reflect these changes. It's an indexer for a bridge contract having two handlers, for depositing tokens to the rollup address (L1 -> L2) and for withdrawing them (L2 -> L1).
15
+
16
+
```yaml [dipdup.yaml]
17
+
spec_version: 2.0
18
+
package: demo_etherlink
19
+
20
+
datasources:
21
+
tzkt:
22
+
kind: tezos.tzkt
23
+
url: ${TZKT_URL:-https://api.nairobinet.tzkt.io}
24
+
25
+
contracts:
26
+
ticketer:
27
+
kind: tezos
28
+
address: KT1PmYUomF3HDxsGWYQUCbLi2X8WvT7ZHv8o
29
+
typename: ticketer
30
+
ticket_helper:
31
+
kind: tezos
32
+
address: KT1TZg9EwGHKbfWvsHGsqBjm3J5NhJBtHPKX
33
+
typename: ticket_helper
34
+
rollup:
35
+
kind: tezos
36
+
address: sr1QgYF6ARMSLcWyAX4wFDrWFaZTyy4twbqe
37
+
typename: rollup
38
+
39
+
indexes:
40
+
rollup_operations:
41
+
kind: tezos.tzkt.operations
42
+
datasource: tzkt
43
+
contracts:
44
+
- ticketer
45
+
- ticket_helper
46
+
- rollup
47
+
types:
48
+
- transaction
49
+
- sr_execute
50
+
handlers:
51
+
- callback: on_deposit
52
+
pattern:
53
+
- type: transaction
54
+
destination: ticketer
55
+
entrypoint: deposit
56
+
- type: transaction
57
+
destination: ticket_helper
58
+
entrypoint: default
59
+
- type: transaction
60
+
destination: rollup
61
+
entrypoint: default
62
+
alias: rollup_default
63
+
- callback: on_withdraw
64
+
pattern:
65
+
- type: sr_execute
66
+
destination: rollup
67
+
- type: transaction
68
+
destination: ticketer
69
+
entrypoint: withdraw
70
+
- type: transaction
71
+
source: ticketer
72
+
entrypoint: transfer
73
+
```
74
+
75
+
To use this demo as a template for your own Etherlink project, run `dipdup new` and choose `demo_etherlink` template.
76
+
77
+
Read more about Etherlink and DipDup support for it:
- [Etherlink: Building The Most Decentralized EVM Layer 2 (On Tezos)](https://news.tezoscommons.org/etherlink-building-the-most-decentralized-evm-layer-2-on-tezos-1c749fb78d34).
Copy file name to clipboardExpand all lines: docs/9.release-notes/2.v7.2.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ We're glad to announce DipDup 7.2! This release brings Etherlink smart rollup co
11
11
12
12
Etherlink is an EVM-compatible smart rollup, which prioritizes fair ordering of transactions, low latency and security.
13
13
14
-
Smart rollups are Tezos’ permissionless L2 scaling solution. They are WASM applications, providing versatility in what language you write them in. You can learn more in [Etherlink docs](https://docs.etherlink.com/welcome/what-is-etherlink)
14
+
Smart rollups are Tezos’ permissionless L2 scaling solution. They are WASM applications, providing versatility in what language you write them in. You can learn more in [Etherlink docs](https://docs.etherlink.com/)
15
15
16
16
Since version 7.2 you can index Etherlink smart rollups like regular Tezos contracts. Choose `demo_etherlink` template when creating a new project:
0 commit comments