Skip to content

Commit 50e6593

Browse files
committed
fix matching migration originations
1 parent 15fb6a3 commit 50e6593

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/dipdup/indexes/tezos_operations/fetcher.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ async def fetch_by_level(self) -> AsyncIterator[tuple[int, tuple[TezosOperationD
512512
'first_level': self._first_level,
513513
'last_level': self._last_level,
514514
}
515-
channels: tuple[FetcherChannel[TezosOperationData, Any, Any], ...] = (
515+
channels: list[FetcherChannel[TezosOperationData, Any, Any]] = [
516516
TransactionAddressFetcherChannel(
517517
filter=self._transaction_addresses,
518518
field='sender',
@@ -551,7 +551,14 @@ async def fetch_by_level(self) -> AsyncIterator[tuple[int, tuple[TezosOperationD
551551
field='rollup',
552552
**channel_kwargs, # type: ignore[arg-type]
553553
),
554-
)
554+
]
555+
if self._migration_originations:
556+
channels.append(
557+
MigrationOriginationFetcherChannel(
558+
filter=set(),
559+
**channel_kwargs, # type: ignore[arg-type]
560+
),
561+
)
555562

556563
operations_iter = self._merged_iter(
557564
channels=set(channels),

src/dipdup/indexes/tezos_operations/matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def match_operation_subgroup(
231231
if operation.type == 'transaction':
232232
matched = match_transaction(pattern_config, operation)
233233
elif isinstance(pattern_config, OriginationPatternConfig):
234-
if operation.type == 'origination':
234+
if operation.type in ('origination', 'migration'):
235235
matched = match_origination(pattern_config, operation)
236236
elif isinstance(pattern_config, SmartRollupExecutePatternConfig):
237237
if operation.type == 'sr_execute':

src/dipdup/indexes/tezos_operations/parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ def _process_storage(
174174
elif isinstance(storage, dict):
175175
for key, value in storage.items():
176176
value_type = get_dict_value_type(storage_type, key)
177+
if value_type is Any:
178+
continue
177179
storage[key] = _process_storage(value, value_type, bigmap_diffs)
178180

179181
# NOTE: Leave others untouched

0 commit comments

Comments
 (0)