For the complete documentation index, see llms.txt. This page is also available as Markdown.

Event Module

Event module fetches event logs.

9.1 Get Logs

Get the emitted events of a smart contract.

Function Name

get_logs
  • Arguments

    address (str): The address of the smart contract.
  • Example Code

    from crypto_com_developer_platform_client import Event
    
    logs = Event.get_logs('0x596A29345b8CAA702544B9167590c648efedB7B0')
    print(logs)
  • Returns

    A list of decoded contract events.
  • Errors

    ValueError: If the Event class is not initialized with a Client instance.
  • Example Return

    {'status': 'Success', 'data': {'logs': [{'_type': 'log', 'address': 'example-address', 'blockHash': 'example-hash', 'blockNumber': example-block-number, 'data': 'example-data', 'index': example-index, 'removed': example-boolean, 'topics': ['example-hash', 'example-hash'], 'transactionHash': 'example-hash', 'transactionIndex': example-index}, ...]}}

Last updated

Was this helpful?