From 9e0ac8cf142192401637e04a480f24c21b7cb8dd Mon Sep 17 00:00:00 2001 From: Igor Sereda Date: Fri, 12 Jul 2024 02:14:01 +0300 Subject: [PATCH] Fixed float timestamp from Subsquid --- src/dipdup/models/evm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dipdup/models/evm.py b/src/dipdup/models/evm.py index 837a44029..125551edb 100644 --- a/src/dipdup/models/evm.py +++ b/src/dipdup/models/evm.py @@ -49,7 +49,7 @@ def from_subsquid_json(cls, event_json: dict[str, Any], header: dict[str, Any]) data=event_json['data'], level=header['number'], log_index=event_json['logIndex'], - timestamp=header['timestamp'], + timestamp=int(header['timestamp']), topics=tuple(event_json['topics']), removed=False, transaction_hash=event_json['transactionHash'], @@ -174,7 +174,7 @@ def from_subsquid_json( s=transaction_json['s'], # sighash=transaction_json['sighash'], status=transaction_json['status'], - timestamp=header['timestamp'], + timestamp=int(header['timestamp']), to=transaction_json['to'], transaction_index=transaction_json['transactionIndex'], type=transaction_json['type'],