Skip to content

Commit

Permalink
Do not request unnecessary operation fields from TzKT (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout authored Apr 27, 2021
1 parent 6e0193c commit 73e90e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
24 changes: 8 additions & 16 deletions src/dipdup/datasources/tzkt/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,",
)

Expand Down Expand Up @@ -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'],
Expand Down
7 changes: 0 additions & 7 deletions src/dipdup/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73e90e8

Please sign in to comment.