From ac7c2a65451c3d4b73711c7e6966bf7bf5affa9b Mon Sep 17 00:00:00 2001 From: Dario Date: Wed, 12 Oct 2022 10:33:46 +0200 Subject: [PATCH] Fix detection of library events Fixes https://github.com/crytic/slither/issues/1407 --- slither/slithir/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/slithir/convert.py b/slither/slithir/convert.py index 829a23e92..a35c50220 100644 --- a/slither/slithir/convert.py +++ b/slither/slithir/convert.py @@ -827,7 +827,7 @@ def extract_tmp_call(ins: TmpCall, contract: Optional[Contract]): # pylint: dis # lib L { event E()} # ... # emit L.E(); - if str(ins.ori.variable_right) in ins.ori.variable_left.events_as_dict: + if str(ins.ori.variable_right) in [f.name for f in ins.ori.variable_left.events]: eventcall = EventCall(ins.ori.variable_right) eventcall.set_expression(ins.expression) eventcall.call_id = ins.call_id