correctly set indexed attribute for event variables

pull/2099/head
alpharush 1 year ago
parent f9633ca67a
commit 2dbb912bb7
  1. 7
      slither/vyper_parsing/variables/event_variable.py

@ -2,7 +2,7 @@ from typing import Dict
from slither.core.variables.event_variable import EventVariable
from slither.vyper_parsing.type_parsing import parse_type
from slither.vyper_parsing.ast.types import AnnAssign
from slither.vyper_parsing.ast.types import AnnAssign, Call
class EventVariableVyper:
@ -10,7 +10,10 @@ class EventVariableVyper:
print(variable_data)
self._variable = variable
self._variable.name = variable_data.target.id
# TODO self._variable.indexed
if isinstance(variable_data.annotation, Call) and variable_data.annotation.func.id == "indexed":
self._variable.indexed = True
else:
self._variable.indexed = False
self._elem_to_parse = variable_data.annotation
@property

Loading…
Cancel
Save