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
Description
Currently,
hiero-enterprise-javaprovides excellent support for deploying and calling functions of smart contracts via theSmartContractClient. 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
topics,data,consensus_timestamp, etc.).ContractLogRepositoryto abstract Mirror Node API polling for logs byContractId./api/v1/contracts/{id}/results/logsendpoints.References