From d0cc777aaaa92c4da923175beb80ef6588f0b8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20P=C5=99evr=C3=A1til?= Date: Mon, 9 Dec 2024 14:25:10 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20events=20to=20Sake=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wake/lsp/sake.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wake/lsp/sake.py b/wake/lsp/sake.py index 4cec76e2..85c0bc02 100644 --- a/wake/lsp/sake.py +++ b/wake/lsp/sake.py @@ -96,6 +96,9 @@ class SakeDeployResult(SakeResult): contract_address: Optional[str] raw_error: Optional[str] # raw hex encoded bytes, None for Success or Halt error: Optional[str] # user-friendly error string, None for Success + events: List[ + str + ] # user-friendly event strings, in correct order, excluding events from reverting subtraces tx_receipt: Dict[str, Any] call_trace: Dict[str, Union[Optional[str], List]] @@ -651,6 +654,7 @@ def fqn_to_contract_abi(fqn: str): return SakeDeployResult( success=success, error=call_trace.error_string, + events=call_trace.event_strings, raw_error=( tx.raw_error.data.hex() if isinstance(tx.raw_error, UnknownTransactionRevertedError)