From 73e90e861ff0482b4a15a83045258f9d267398fc Mon Sep 17 00:00:00 2001 From: Lev Gorodetskiy Date: Tue, 27 Apr 2021 16:15:20 +0300 Subject: [PATCH] Do not request unnecessary operation fields from TzKT (#36) --- src/dipdup/datasources/tzkt/datasource.py | 24 ++++++++--------------- src/dipdup/models.py | 7 ------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/dipdup/datasources/tzkt/datasource.py b/src/dipdup/datasources/tzkt/datasource.py index 1be238e72..5b0fd7d44 100644 --- a/src/dipdup/datasources/tzkt/datasource.py +++ b/src/dipdup/datasources/tzkt/datasource.py @@ -29,22 +29,21 @@ "initiator", "sender", "nonce", - "gasLimit", - "gasUsed", - "storageLimit", - "storageUsed", - "bakerFee", - "storageFee", - "allocationFee", + # "gasLimit", + # "gasUsed", + # "storageLimit", + # "storageUsed", + # "bakerFee", + # "storageFee", + # "allocationFee", "target", "amount", "parameter", "storage", "status", - "errors", + # "errors", "hasInternals", # "quote", - "parameters", "diffs,", ) @@ -331,13 +330,6 @@ def convert_operation(cls, operation_json: Dict[str, Any]) -> OperationData: hash=operation_json['hash'], counter=operation_json['counter'], sender_address=operation_json['sender']['address'], - gas_limit=operation_json['gasLimit'], - gas_used=operation_json['gasUsed'], - storage_limit=operation_json['storageLimit'], - storage_used=operation_json['storageUsed'], - baker_fee=operation_json['bakerFee'], - storage_fee=operation_json['storageFee'], - allocation_fee=operation_json['allocationFee'], target_address=operation_json['target']['address'], amount=operation_json['amount'], status=operation_json['status'], diff --git a/src/dipdup/models.py b/src/dipdup/models.py index ee12a40d9..813980fa2 100644 --- a/src/dipdup/models.py +++ b/src/dipdup/models.py @@ -42,13 +42,6 @@ class OperationData: hash: str counter: int sender_address: str - gas_limit: int - gas_used: int - storage_limit: int - storage_used: int - baker_fee: int - storage_fee: int - allocation_fee: int target_address: str amount: int status: str