From 8d168fbad1be68237173df45d1832f54f31d15fa Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Fri, 17 May 2024 09:21:12 -0500 Subject: [PATCH] fix: itermisses --- ape_vyper/compiler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ape_vyper/compiler.py b/ape_vyper/compiler.py index ccd6e22e..a2b88737 100644 --- a/ape_vyper/compiler.py +++ b/ape_vyper/compiler.py @@ -1049,12 +1049,13 @@ def enrich_error(self, err: ContractLogicError) -> ContractLogicError: def trace_source( self, contract_source: ContractSource, trace: TraceAPI, calldata: HexBytes ) -> SourceTraceback: - return self._get_traceback(contract_source, trace, calldata) + frames = trace.get_raw_frames() + return self._get_traceback(contract_source, frames, calldata) def _get_traceback( self, contract_src: ContractSource, - trace: TraceAPI, + frames: Iterator[dict], calldata: HexBytes, previous_depth: Optional[int] = None, ) -> SourceTraceback: @@ -1062,7 +1063,6 @@ def _get_traceback( method_id = HexBytes(calldata[:4]) completed = False pcmap = PCMap.model_validate({}) - frames = trace.get_raw_frames() for frame in frames: if frame["op"] in CALL_OPCODES: @@ -1073,7 +1073,7 @@ def _get_traceback( if ext.endswith(".vy"): # Called another Vyper contract. sub_trace = self._get_traceback( - called_contract, trace, sub_calldata, previous_depth=frame["depth"] + called_contract, frames, sub_calldata, previous_depth=frame["depth"] ) traceback.extend(sub_trace) @@ -1082,7 +1082,7 @@ def _get_traceback( compiler = self.compiler_manager.registered_compilers[ext] try: sub_trace = compiler.trace_source( - called_contract.contract_type, trace, sub_calldata + called_contract.contract_type, frames, sub_calldata ) traceback.extend(sub_trace) except NotImplementedError: