Пример #1
0
    def analyze_events(self):
        for father in self.inheritance_reverse:
            self._events.update(father.events_as_dict())

        for event_to_parse in self._eventsNotParsed:
            event = EventSolc(event_to_parse, self)
            event.analyze(self)
            event.set_contract(self)
            event.set_offset(event_to_parse['src'], self.slither)
            self._events[event.full_name] = event

        self._eventsNotParsed = None
Пример #2
0
    def analyze_events(self):
        try:
            for father in self.inheritance_reverse:
                self._events.update(father.events_as_dict())

            for event_to_parse in self._eventsNotParsed:
                event = EventSolc(event_to_parse, self)
                event.analyze(self)
                event.set_contract(self)
                event.set_offset(event_to_parse['src'], self.slither)
                self._events[event.full_name] = event
        except (VariableNotFound, KeyError) as e:
            self.log_incorrect_parsing(f'Missing event {e}')

        self._eventsNotParsed = None