Merge pull request #33 from milancermak/small-fixes

Small fixes
This commit is contained in:
Robert Miller 2021-07-30 00:09:05 -04:00 committed by GitHub
commit 4a1b69fbc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)