@@ -299,18 +299,21 @@ def parse_getters(self, tvm: TVM, tlb_sources, force_all: bool = False) -> dict:
299299 getter_cache .set ((tvm .code_hash , tvm .data_hash , self .method_id ), stack )
300300
301301 if self .result_length_strict_check :
302- assert len (stack ) == len (self .method_result )
302+ if len (stack ) != len (self .method_result ):
303+ return
303304
304305 if self .result_strict_type_check :
305306 my_result_hash = stack .get_abi_hash ()
306- assert my_result_hash == self .method_result_hash
307+ if my_result_hash != self .method_result_hash :
308+ return
307309
308310 tmp = {}
309311
310312 for getter , stack_entry in zip (self .method_result , stack ):
311313 if getter .required is not None :
312314 stack_entry_value = stack_entry .as_int () if getter .type == "Int" else stack_entry .get ().get_hash ()
313- assert stack_entry_value == getter .required
315+ if stack_entry_value != getter .required :
316+ return
314317
315318 try :
316319 tmp .update (getter .parse_stack_item (stack_entry , tlb_sources , force_all , tvm = tvm ))
@@ -332,18 +335,21 @@ async def aparse_getters(self, tvm: TVM, tlb_sources, force_all: bool = False) -
332335 getter_cache .set ((tvm .code_hash , tvm .data_hash , self .method_id ), stack )
333336
334337 if self .result_length_strict_check :
335- assert len (stack ) == len (self .method_result )
338+ if len (stack ) != len (self .method_result ):
339+ return
336340
337341 if self .result_strict_type_check :
338342 my_result_hash = stack .get_abi_hash ()
339- assert my_result_hash == self .method_result_hash
343+ if my_result_hash != self .method_result_hash :
344+ return
340345
341346 tmp = {}
342347
343348 for getter , stack_entry in zip (self .method_result , stack ):
344349 if getter .required is not None :
345350 stack_entry_value = stack_entry .as_int () if getter .type == "Int" else stack_entry .get ().get_hash ()
346- assert stack_entry_value == getter .required
351+ if stack_entry_value != getter .required :
352+ return
347353
348354 try :
349355 tmp .update (getter .parse_stack_item (stack_entry , tlb_sources , force_all , tvm = tvm ))
0 commit comments