Skip to content

Commit

Permalink
Handle BadFunctionCallOutput error while detecting interface
Browse files Browse the repository at this point in the history
  • Loading branch information
yongchand committed Jan 25, 2023
1 parent aa17f00 commit dd101f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions klaytnetl/service/klaytn_contract_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


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

from ethereum_dasm.evmdasm import EvmCode, Contract
from klaytnetl.erc165_abi import ERC165_ABI
Expand Down Expand Up @@ -73,7 +73,7 @@ def contract_interface_support(self, contract_address, block_number, interface):
try:
contract_interface_support = contract_165.functions.supportsInterface(interface) \
.call(block_identifier=block_number)
except ContractLogicError:
except (BadFunctionCallOutput, ContractLogicError) :
contract_interface_support = False
return contract_interface_support

Expand Down

0 comments on commit dd101f5

Please sign in to comment.