Skip to content

Commit

Permalink
fix debug decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizard1209 committed Nov 18, 2024
1 parent 9cbcd7a commit 49d121d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dipdup/datasources/substrate_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ async def get_events(self, height: int, decoder: SubstrateRuntime) -> tuple[Subs
# take type from runtime config

# add runtime metadata using metadata kwarg
event = decoder.create_scale_object(
'Vec<frame_system:EventRecord>', data=ScaleBytes(event_data), runtime_config=decoder, metadata=spec.metadata
scale_object = runtime_config.create_scale_object(
'Vec<frame_system:EventRecord>', metadata=spec._metadata
)
event_bytes = ScaleBytes(event_data)
event = scale_object.decode(event_bytes)

async for line in block:
block_data = orjson.loads(line)
Expand Down

0 comments on commit 49d121d

Please sign in to comment.