from web3._utils.events import get_event_data @lru_cache(maxsize=None)def get_topic2abi(abi): if isinstance(abi, (str)): abi = json.loads(abi) event_abi = [a for a in abi if a['type'] == 'event'] topic2abi = {event_abi_to_log_topic(): _ for _ in event_abi} return topic2abi @lru_cache(maxsize=None)def _get_hex_topic(t): hex_t = HexBytes(t) return hex_t def decode_log(data, topics, abi): if abi is not None: try: topic2abi = _get_topic2abi(abi) log = { 'address': No...