Skip to content

feat: Add ContractLog data model and repository interface#75

Open
Twiineenock wants to merge 1 commit intohiero-ledger:mainfrom
Twiineenock:feature/smart-contract-logs-api
Open

feat: Add ContractLog data model and repository interface#75
Twiineenock wants to merge 1 commit intohiero-ledger:mainfrom
Twiineenock:feature/smart-contract-logs-api

Conversation

@Twiineenock
Copy link
Copy Markdown

Description

This PR addresses the first phase of the proposed solution in the linked issue by establishing the core data model and repository interface for the Smart Contract Event and Log API.

To ensure the review process is clean and manageable for mentors, the implementation is being split into logical PRs. This PR specifically focuses on the public API surface:

  • Introduces the ContractLog record, meticulously mapped to the EVM event log format returned by the Hiero Mirror Node (handling fields like topics, data, and mapping consensus_timestamp to Java's Instant).
  • Introduces the ContractLogRepository interface to provide a high-level abstraction for querying logs by ContractId.

Subsequent PRs will introduce the base module implementations, followed by the framework-native (Spring Boot/MicroProfile) JSON parsers and pagination handlers.

Related issue(s)

Fixes #74

NB

  • Data models prioritize immutability (topics list is wrapped in List.copyOf()) and strict null-safety using org.jspecify.annotations.

This commit introduces the core data model (ContractLog) and the ContractLogRepository interface to support querying smart contract events from the Hiero Mirror Node. This establishes the public API surface for the feature, and is aligned strictly with the Hedera Mirror Node REST API JSON responses.

Signed-off-by: Twiineenock <Twiineenock@users.noreply.github.com>
@Twiineenock Twiineenock force-pushed the feature/smart-contract-logs-api branch from 2cd3014 to 51023e9 Compare April 23, 2026 06:19
@Twiineenock
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Smart Contract Event and Log Observation API

1 participant