Small fixes

This commit is contained in:
Milan Cermak 2021-07-25 18:42:29 +02:00
parent 0679592216
commit 3425ea7507
2 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class Web3Model(BaseModel):
class CamelModel(BaseModel):
"""BaseModel that translates from camelCase to snake_case"""
"""BaseModel that translates from snake_case to camelCase"""
class Config(Web3Model.Config):
alias_generator = to_camel

View File

@ -84,6 +84,7 @@ def get_tx_proxies(tx_traces: List[Trace], to_address: Optional[str]):
def get_net_gas_used(tx_hash, block):
gas_used = 0
for trace in block.traces:
if trace.transaction_hash == tx_hash:
gas_used += int(trace.result["gasUsed"], 16)