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

feat: Implemented TokenRepository to interact with MirrorNodeClient API #143

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

manishdait
Copy link
Contributor

This pull request introduces the TokenRepository interface and its implementation for interacting with the Mirror Node REST API to query token information.

Closes: #98


import java.util.List;

public record CustomFee(List<FixedFee> fixedFees, List<FractionalFee> fractionalFees, List<RoyaltyFee> royaltyFees) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add null checks for the lists. While it is ok to have empty lists I would suggest to not all null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

import com.hedera.hashgraph.sdk.TokenId;
import org.jspecify.annotations.Nullable;

public record FixedFee(long amount, @Nullable AccountId collectorAccountId, @Nullable TokenId denominatingTokenId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NullChecks should be added in constructor.

public record FractionalFee(
long numeratorAmount,
long denominatorAmount,
@Nullable AccountId collectorAccountId,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NullChecks should be added in constructor.

long numeratorAmount,
long denominatorAmount,
long fallbackFeeAmount,
@Nullable AccountId collectorAccountId,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NullChecks should be added in constructor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ndacyayisenga-droid can you create an issue once the PR is merged

import com.hedera.hashgraph.sdk.TokenId;
import org.jspecify.annotations.Nullable;

public record RoyaltyFee(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ndacyayisenga-droid we should check if Hedera provides a documentation for those objects and add a javadoc here (we can create an issue for that)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ndacyayisenga-droid we should check if Hedera provides a documentation for those objects and add a javadoc here (we can create an issue for that)

There's hedera documentation for all that actually. I will get an issue once this is merged.

@hendrikebbers
Copy link
Member

@manishdait that is really great work!!!! Can you please update your branch to remove the current conflict. Happy to merge it as soon as possible

@hendrikebbers hendrikebbers merged commit 625f3be into OpenElements:main Jan 16, 2025
4 checks passed
@hendrikebbers
Copy link
Member

Merged! Thank you so much @manishdait for that great work!

@manishdait manishdait deleted the issue-98 branch January 17, 2025 15:23
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.

Provide TokenRepository API for hedera-base
3 participants