Skip to content

Commit

Permalink
catch KeyError and TypeDecodeError
Browse files Browse the repository at this point in the history
  • Loading branch information
elicbarbieri committed Oct 18, 2024
1 parent dfce1ba commit 7a9236c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nethermind/idealis/rpc/starknet/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from nethermind.idealis.types.starknet.core import Transaction
from nethermind.idealis.types.starknet.enums import StarknetTxType
from nethermind.starknet_abi.dispatch import DecodingDispatcher, StarknetAbi
from nethermind.starknet_abi.exceptions import InvalidCalldataError
from nethermind.starknet_abi.exceptions import InvalidCalldataError, TypeDecodeError
from nethermind.starknet_abi.utils import starknet_keccak

CONSTRUCTOR_SIGNATURE = starknet_keccak(b"constructor")
Expand Down Expand Up @@ -125,7 +125,7 @@ def get_contract_deployments(
function_selector=CONSTRUCTOR_SIGNATURE,
class_hash=transaction.class_hash,
)
except InvalidCalldataError as e:
except (InvalidCalldataError, KeyError, TypeDecodeError) as e:
logger.error(
f"Decode Error while Parsing Contract Deployment for Transaction "
f"0x{transaction.transaction_hash.hex()}: {e}"
Expand Down

0 comments on commit 7a9236c

Please sign in to comment.