Small fixes
This commit is contained in:
parent
0679592216
commit
3425ea7507
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user