Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Custom Processors] coin_flip/processor.py included_event_type: IndexError: list index out of range #452

Open
HoganBright opened this issue Jul 11, 2024 · 0 comments
Labels
custom-processors Issues relating to the Custom Processors

Comments

@HoganBright
Copy link

Description

Traceback (most recent call last):
  File "/aptos-indexer-processors/python/utils/worker.py", line 583, in run
    self.processing_result = self.processor.process_transactions(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/aptos-indexer-processors/python/processors/coin_flip/processor.py", line 51, in process_transactions
    if not CoinFlipProcessor.included_event_type(event.type_str):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/aptos-indexer-processors/python/processors/coin_flip/processor.py", line 115, in included_event_type
    module_name = parsed_tag[1]
                  ~~~~~~~~~~^^^
IndexError: list index out of range

Repro

code line:

Suggestion

python/processors/coin_flip/processor.py

MODULE_ADDRESS = general_utils.standardize_address(
    "0xe57752173bc7c57e9b61c84895a75e53cd7c0ef0855acd81d31cb39b0e87e1d0"
)
ENENT_TYPE = "{MODULE_ADDRESS}::coin_flip::CoinFlipEvent".format(MODULE_ADDRESS=MODULE_ADDRESS)

...

class CoinFlipProcessor(TransactionsProcessor):
...
    @staticmethod
    def included_event_type(event_type: str) -> bool:
        return event_type == ENENT_TYPE
@HoganBright HoganBright added the custom-processors Issues relating to the Custom Processors label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom-processors Issues relating to the Custom Processors
Projects
None yet
Development

No branches or pull requests

1 participant