Skip to content

Commit 247cf3c

Browse files
Wizard1209claude
andcommitted
tezos: migrate events demo and tzkt URLs from dead ghostnet to shadownet
Ghostnet was decommissioned; api.ghostnet.tzkt.io no longer resolves, so the demo_tezos_events run/init tests and test_tzkt.test_no_content all failed with DNS errors (not an infra flake). Shadownet is the current Tezos testnet. - tezos_tzkt: swap the ghostnet entry in TZKT_API_URLS for shadownet - demo_tezos_events: repoint the events demo at a shadownet contract with equivalent properties — KT1E3EQJmoajoTj9YXJWgenuYTHnDUoWSiFt (WETH bridge) emits two frequent typed events (Wrap/Unwrap, like move/roll) plus a rare Create caught by the fallback handler. Regenerated handlers and types via `dipdup init`; move/roll -> wrap/unwrap. - tests: point demo_tezos_events config and test_no_content at shadownet - docs: update tezos.events include to on_wrap_event.py - regenerate merged changelog (was stale, missing the Portal/api_key Added entries) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 50fbb26 commit 247cf3c

12 files changed

Lines changed: 55 additions & 42 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Releases prior to 7.0 has been removed from this file to declutter search result
1414
- evm.sqd_portal: Added a new datasource backed by the SQD Portal (`portal.sqd.dev`), a streaming alternative to the v2.archive `evm.subsquid` gateway.
1515
- evm.subsquid, starknet.subsquid, substrate.subsquid: Added `api_key` option to authenticate with `v2.archive.subsquid.io` gateways, which require a key since 2026-05-19.
1616

17+
### Changed
18+
19+
- tezos.tzkt: Replaced decommissioned ghostnet with shadownet in known testnet URLs and the `demo_tezos_events` project.
20+
1721
## [8.5.2] - 2026-04-08
1822

1923
### Fixed

docs/2.indexes/6.tezos_events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Kathmandu Tezos protocol upgrade has introduced [contract events](https://tezos.
1414

1515
Unlike big maps, contracts may introduce new event tags and payloads at any time, so the index must be updated accordingly.
1616

17-
```python [handlers/on_move_event.py]
18-
{{ #include ../src/demo_tezos_events/handlers/on_move_event.py }}
17+
```python [handlers/on_wrap_event.py]
18+
{{ #include ../src/demo_tezos_events/handlers/on_wrap_event.py }}
1919
```
2020

2121
Each contract can have a fallback handler called for all unknown events so you can process untyped data.
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<!-- markdownlint-disable first-line-h1 -->
22
## Changes since -1.x
33

4-
### Fixed
4+
### Added
55

6-
- database: Fix exception when creating connections with aiosqlite==0.22.0.
6+
- context: Added `get_evm_portal_datasource` method to access `evm.sqd_portal` datasources from handlers and hooks with a precise type.
7+
- evm.sqd_portal: Added a new datasource backed by the SQD Portal (`portal.sqd.dev`), a streaming alternative to the v2.archive `evm.subsquid` gateway.
8+
- evm.subsquid, starknet.subsquid, substrate.subsquid: Added `api_key` option to authenticate with `v2.archive.subsquid.io` gateways, which require a key since 2026-05-19.
9+
10+
### Changed
11+
12+
- tezos.tzkt: Replaced decommissioned ghostnet with shadownet in known testnet URLs and the `demo_tezos_events` project.

src/demo_tezos_events/dipdup.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ package: demo_tezos_events
44
datasources:
55
tzkt:
66
kind: tezos.tzkt
7-
url: https://api.ghostnet.tzkt.io
7+
url: https://api.shadownet.tzkt.io
88

99
contracts:
1010
events_contract:
1111
kind: tezos
12-
address: KT1Up6AMehze2VTdt3w85xaZPtrEWn1AeyR3
12+
address: KT1E3EQJmoajoTj9YXJWgenuYTHnDUoWSiFt
1313

1414
indexes:
1515
events:
1616
kind: tezos.events
1717
datasources:
1818
- tzkt
1919
handlers:
20-
- callback: on_move_event
20+
- callback: on_wrap_event
2121
contract: events_contract
22-
tag: move
23-
- callback: on_roll_event
22+
tag: Wrap
23+
- callback: on_unwrap_event
2424
contract: events_contract
25-
tag: roll
25+
tag: Unwrap
2626
- callback: on_other_event
2727
contract: events_contract
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from demo_tezos_events import models as models
2-
from demo_tezos_events.types.events_contract.tezos_events.roll import RollPayload
2+
from demo_tezos_events.types.events_contract.tezos_events.unwrap import UnwrapPayload
33
from dipdup.context import HandlerContext
44
from dipdup.models.tezos import TezosEvent
55

66

7-
async def on_roll_event(
7+
async def on_unwrap_event(
88
ctx: HandlerContext,
9-
event: TezosEvent[RollPayload],
9+
event: TezosEvent[UnwrapPayload],
1010
) -> None: ...
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from demo_tezos_events import models as models
2-
from demo_tezos_events.types.events_contract.tezos_events.move import MovePayload
2+
from demo_tezos_events.types.events_contract.tezos_events.wrap import WrapPayload
33
from dipdup.context import HandlerContext
44
from dipdup.models.tezos import TezosEvent
55

66

7-
async def on_move_event(
7+
async def on_wrap_event(
88
ctx: HandlerContext,
9-
event: TezosEvent[MovePayload],
9+
event: TezosEvent[WrapPayload],
1010
) -> None: ...

src/demo_tezos_events/types/events_contract/tezos_events/roll.py renamed to src/demo_tezos_events/types/events_contract/tezos_events/unwrap.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
from pydantic import ConfigDict
77

88

9-
class RollPayload(BaseModel):
9+
class UnwrapPayload(BaseModel):
1010
model_config = ConfigDict(
1111
extra='forbid',
1212
)
13-
address: str
14-
bool: bool
13+
id: str
14+
user: str
15+
token_address: str
16+
token_amount: str
17+
eth_token_address: str
18+
eth_address: str

src/demo_tezos_events/types/events_contract/tezos_events/move.py renamed to src/demo_tezos_events/types/events_contract/tezos_events/wrap.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
from pydantic import ConfigDict
77

88

9-
class MovePayload(BaseModel):
9+
class WrapPayload(BaseModel):
1010
model_config = ConfigDict(
1111
extra='forbid',
1212
)
13-
address: str
14-
a: str
15-
b: str
16-
roll: str
17-
epoch: str
18-
rolls: str
13+
id: str
14+
user: str
15+
ethereum_token: str
16+
token_address: str
17+
token_amount: str

src/dipdup/config/tezos_tzkt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
TZKT_API_URLS: dict[str, str] = {
1414
'https://api.tzkt.io': 'mainnet',
15-
'https://api.ghostnet.tzkt.io': 'ghostnet',
15+
'https://api.shadownet.tzkt.io': 'shadownet',
1616
'https://api.limanet.tzkt.io': 'limanet',
1717
'https://staging.api.tzkt.io': 'staging',
1818
}

src/dipdup/projects/demo_tezos_events/dipdup.yaml.j2

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ package: {{ project.package }}
44
datasources:
55
tzkt:
66
kind: tezos.tzkt
7-
url: https://api.ghostnet.tzkt.io
7+
url: https://api.shadownet.tzkt.io
88

99
contracts:
1010
events_contract:
1111
kind: tezos
12-
address: KT1Up6AMehze2VTdt3w85xaZPtrEWn1AeyR3
12+
address: KT1E3EQJmoajoTj9YXJWgenuYTHnDUoWSiFt
1313

1414
indexes:
1515
events:
1616
kind: tezos.events
1717
datasources:
1818
- tzkt
1919
handlers:
20-
- callback: on_move_event
20+
- callback: on_wrap_event
2121
contract: events_contract
22-
tag: move
23-
- callback: on_roll_event
22+
tag: Wrap
23+
- callback: on_unwrap_event
2424
contract: events_contract
25-
tag: roll
25+
tag: Unwrap
2626
- callback: on_other_event
2727
contract: events_contract

0 commit comments

Comments
 (0)