Merge pull request #371 from FeSens/bugfix/contract-logic-error

Bugfix: Ignore ContractLogicError raised by Web3.py
This commit is contained in:
Evgeny Medvedev
2022-08-16 21:26:24 +07:00
committed by GitHub

View File

@@ -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
@@ -82,7 +82,7 @@ class EthTokenService(object):
# 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: