Skip to content

Feature: Smart Contract Event and Log Observation API #74

@Twiineenock

Description

@Twiineenock

Description

Currently, hiero-enterprise-java provides excellent support for deploying and calling functions of smart contracts via the SmartContractClient. However, it currently lacks an API to observe and query the events and logs emitted by those smart contracts.

This functionality is crucial for enterprise applications that need to react to on-chain events (such as token mints, state changes, or custom application logic) emitted by Hiero smart contracts.

Proposed Solution

  • Introduce a data model mapping to the EVM event log format emitted by the Hiero Mirror Node (incorporating topics, data, consensus_timestamp, etc.).
  • Introduce a high-level ContractLogRepository to abstract Mirror Node API polling for logs by ContractId.
  • Provide framework-native implementations (Spring Boot Jackson / MicroProfile JSON-B) to seamlessly parse the paginated /api/v1/contracts/{id}/results/logs endpoints.
  • Update sample applications to demonstrate fetching logs.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions