Skip to content

Commit

Permalink
Merge pull request #307 from BoostryJP/fix/#306
Browse files Browse the repository at this point in the history
fix: ABIFunctionNotFound
  • Loading branch information
YoshihitoAso authored Apr 22, 2022
2 parents 494705f + f502980 commit d8d864e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/utils/contract_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ def call_function(contract: contract,
:param default_returns: Default return when web3 exceptions are raised
:return: Return from function or default return
"""
_function = getattr(contract.functions, function_name)

try:
_function = getattr(contract.functions, function_name)
result = _function(*args).call()
except (BadFunctionCallOutput, ABIFunctionNotFound) as web3_exception:
if default_returns is not None:
Expand Down

0 comments on commit d8d864e

Please sign in to comment.