Skip to content

Commit

Permalink
Merge pull request #371 from FeSens/bugfix/contract-logic-error
Browse files Browse the repository at this point in the history
Bugfix: Ignore ContractLogicError raised by Web3.py
  • Loading branch information
medvedev1088 committed Aug 16, 2022
2 parents be64a90 + 342c5df commit 6b64c23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ethereumetl/service/eth_token_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# SOFTWARE.
import logging

from web3.exceptions import BadFunctionCallOutput
from web3.exceptions import BadFunctionCallOutput, ContractLogicError

from ethereumetl.domain.token import EthToken
from ethereumetl.erc20_abi import ERC20_ABI, ERC20_ABI_ALTERNATIVE_1
Expand Down Expand Up @@ -82,7 +82,7 @@ def _call_contract_function(self, func):
# OverflowError exception happens if the return type of the function doesn't match the expected type
result = call_contract_function(
func=func,
ignore_errors=(BadFunctionCallOutput, OverflowError, ValueError),
ignore_errors=(BadFunctionCallOutput, ContractLogicError, OverflowError, ValueError),
default_value=None)

if self._function_call_result_transformer is not None:
Expand Down

0 comments on commit 6b64c23

Please sign in to comment.