-
Notifications
You must be signed in to change notification settings - Fork 44
feat(platform): token last claim query #2559
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
Conversation
WalkthroughThis change introduces a new gRPC method, Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant DAPI-gRPC
participant Drive-ABCI
participant Drive
participant GroveDB
Client->>DAPI-gRPC: getTokenPerpetualDistributionLastClaim(request)
DAPI-gRPC->>Drive-ABCI: get_token_perpetual_distribution_last_claim(request)
Drive-ABCI->>Drive: query_token_perpetual_distribution_last_claim(request, state, version)
alt Prove flag is set
Drive->>Drive: prove_perpetual_distribution_last_paid_moment(token_id, identity_id, ...)
Drive->>GroveDB: grove_get_proved_path_query(...)
GroveDB-->>Drive: proof bytes
Drive-->>Drive-ABCI: response with proof
else Contract info present
Drive->>Drive: fetch contract, validate position, get config
Drive->>Drive: fetch last paid moment (decoded)
Drive-->>Drive-ABCI: response with last claim info
else Raw query
Drive->>Drive: fetch last paid moment (raw bytes)
Drive-->>Drive-ABCI: response with raw bytes
end
Drive-ABCI-->>DAPI-gRPC: GetTokenPerpetualDistributionLastClaimResponse
DAPI-gRPC-->>Client: Response (last claim info or proof)
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (5)
packages/rs-drive/src/verify/tokens/verify_token_perpetual_distribution_last_paid_time/v0/mod.rs (2)
52-55: Use a semantically‑accurate proof error for “non‑item” elements
ProofError::IncorrectValueSizesuggests that the byte length of the value is wrong, while the real problem is that the proof pointed to an element whose type is notItem.
Consider introducing/using something likeProofError::IncorrectElementType(or similar) to avoid misleading consumers of the API and to ease debugging.
26-38: Tiny duplication – extract common verification callThe two
GroveDb::*verify*_query_with_absence_proofinvocations differ only by the function name. A local helper (or a closure) would remove the duplication and the extraifindentation, keeping the happy path flush‑left.Non‑blocking, but worth considering as the number of such verify branches grows.
packages/rs-drive/src/drive/tokens/distribution/fetch/perpetual_distribution_last_paid_moment/v0/mod.rs (2)
46-56: Path helper is mis‑named (…last_claimed_time…) while fetching last paid momentThe helper
token_perpetual_distributions_identity_last_claimed_time_pathreturns the path used for paid moment look‑ups.
The “claimed_time” wording is easy to confuse with a claim timestamp that lives in a different subtree.
Renaming (or aliasing) it to something containing “paid_moment” will prevent accidental mix‑ups later.
108-118: Duplicate decoding logic – factor into a shared helper
moment_from_byteserror mapping is replicated here and in
verify_token_perpetual_distribution_last_paid_time_v0.
Centralising the decode‑with‑mapping into a smallfn decode_moment(...) -> Result<RewardDistributionMoment, Error>(possibly onRewardDistributionType) would:
- keep the panic/error text in one place,
- guarantee identical validation across call‑sites,
- and shorten both fetch/verify implementations.
packages/dapi-grpc/protos/platform/v0/platform.proto (1)
1486-1508: Field number gap without reservationIn
GetTokenPerpetualDistributionLastClaimRequestV0fieldidentity_idis numbered 4, leaving3unused and not reserved.
If someone later adds another field and (unaware of the gap) assigns3, old clients will silently mis‑interpret the message.Add an explicit reservation or renumber now:
message GetTokenPerpetualDistributionLastClaimRequestV0 { bytes token_id = 1; optional ContractTokenInfo contract_info = 2; reserved 3; // keep free for compatibility bytes identity_id = 4; bool prove = 5; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (25)
packages/dapi-grpc/protos/platform/v0/platform.proto(2 hunks)packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/mod.rs(3 hunks)packages/rs-drive-abci/src/query/service.rs(2 hunks)packages/rs-drive-abci/src/query/token_queries/mod.rs(1 hunks)packages/rs-drive-abci/src/query/token_queries/token_perpetual_distribution_last_claim/mod.rs(1 hunks)packages/rs-drive-abci/src/query/token_queries/token_perpetual_distribution_last_claim/v0/mod.rs(1 hunks)packages/rs-drive/src/drive/tokens/distribution/fetch/perpetual_distribution_last_paid_moment/mod.rs(1 hunks)packages/rs-drive/src/drive/tokens/distribution/fetch/perpetual_distribution_last_paid_moment/v0/mod.rs(3 hunks)packages/rs-drive/src/drive/tokens/distribution/fetch/pre_programmed_distributions/v0/mod.rs(2 hunks)packages/rs-drive/src/drive/tokens/distribution/prove/mod.rs(1 hunks)packages/rs-drive/src/drive/tokens/distribution/prove/perpetual_distribution_last_paid_moment/mod.rs(1 hunks)packages/rs-drive/src/drive/tokens/distribution/prove/perpetual_distribution_last_paid_moment/v0/mod.rs(1 hunks)packages/rs-drive/src/drive/tokens/distribution/prove/pre_programmed_distributions/v0/mod.rs(2 hunks)packages/rs-drive/src/drive/tokens/distribution/queries.rs(2 hunks)packages/rs-drive/src/verify/tokens/mod.rs(1 hunks)packages/rs-drive/src/verify/tokens/verify_token_perpetual_distribution_last_paid_time/mod.rs(1 hunks)packages/rs-drive/src/verify/tokens/verify_token_perpetual_distribution_last_paid_time/v0/mod.rs(1 hunks)packages/rs-drive/src/verify/tokens/verify_token_pre_programmed_distributions/v0/mod.rs(2 hunks)packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs(1 hunks)packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs(1 hunks)packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs(1 hunks)packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs(1 hunks)packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs(1 hunks)packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs(1 hunks)packages/rs-platform-version/src/version/mocks/v2_test.rs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/mimic/test_quorum.rs:159-164
Timestamp: 2024-11-20T16:16:01.830Z
Learning: QuantumExplorer prefers not to receive auto-generated messages asking to post on social media.
🧬 Code Graph Analysis (4)
packages/rs-drive/src/verify/tokens/mod.rs (1)
packages/rs-drive/src/verify/tokens/verify_token_perpetual_distribution_last_paid_time/mod.rs (1)
verify_token_perpetual_distribution_last_paid_time(46-75)
packages/rs-drive/src/drive/tokens/distribution/prove/perpetual_distribution_last_paid_moment/v0/mod.rs (1)
packages/rs-drive/src/drive/tokens/paths.rs (1)
token_perpetual_distributions_identity_last_claimed_time_path_vec(215-225)
packages/rs-drive/src/verify/tokens/verify_token_perpetual_distribution_last_paid_time/v0/mod.rs (1)
packages/rs-drive/src/drive/tokens/distribution/queries.rs (1)
perpetual_distribution_last_paid_moment_query(108-115)
packages/rs-drive/src/verify/tokens/verify_token_perpetual_distribution_last_paid_time/mod.rs (1)
packages/rs-drive/src/verify/tokens/verify_token_perpetual_distribution_last_paid_time/v0/mod.rs (1)
verify_token_perpetual_distribution_last_paid_time_v0(16-62)
⏰ Context from checks skipped due to timeout of 90000ms (17)
- GitHub Check: Rust packages (dash-sdk) / Detect immutable structure changes
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive) / Tests
- GitHub Check: Rust packages (drive) / Formatting
- GitHub Check: Rust packages (drive) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
🔇 Additional comments (34)
packages/rs-drive/src/drive/tokens/distribution/prove/mod.rs (1)
1-1: LGTM: New module for token perpetual distribution proofsThis addition introduces a module for proving the last paid moment of token perpetual distributions, which complements the fetch and verify functionality for this feature.
packages/rs-drive/src/verify/tokens/mod.rs (1)
9-9: LGTM: New verification module correctly addedThe new module declaration for verifying token perpetual distribution last paid time is properly positioned and follows the naming convention of other verification modules.
packages/rs-drive-abci/src/query/token_queries/mod.rs (1)
6-6: LGTM: New query module appropriately addedThe new module for token perpetual distribution last claim queries is correctly positioned alphabetically and follows the established naming pattern.
packages/rs-drive/src/verify/tokens/verify_token_pre_programmed_distributions/v0/mod.rs (2)
1-1: LGTM: Import simplified for QueryPreProgrammedDistributionStartAtThe import statement now only imports the necessary type, following good Rust practices.
42-42: LGTM: Updated to use fully qualified method callCorrectly updated to use
Drive::pre_programmed_distributions_queryto align with the refactoring of this method as aDriveimplementation function.packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs (1)
36-36: LGTM: New field for token perpetual distribution last claim added correctlyThe new field follows the established pattern in this versioning struct, using
FeatureVersionBoundsconsistent with other token query features. This addition aligns perfectly with the PR objective of enabling queries for token last claim information.packages/rs-drive/src/drive/tokens/distribution/fetch/pre_programmed_distributions/v0/mod.rs (1)
1-1: Import and function call refactored properlyThe import has been simplified and the function call has been updated to use
Drive::pre_programmed_distributions_queryinstead of accessing the function directly. This reflects an architectural improvement where the function was moved to be a method on theDrivestruct.Also applies to: 45-45
packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs (1)
71-71: LGTM: New verification method added for token perpetual distributionThe new field for token perpetual distribution last paid time verification follows the established pattern for versioning. This complements the query functionality being added elsewhere and aligns with the PR objectives.
packages/rs-drive/src/drive/tokens/distribution/prove/pre_programmed_distributions/v0/mod.rs (1)
1-1: Import and function call refactored consistentlyThe import has been simplified and the function call has been updated to use
Drive::pre_programmed_distributions_query. This matches the pattern used in the fetch module and reflects a consistent architectural improvement.Also applies to: 39-39
packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs (1)
53-53: Add missing perpetual_distribution_last_paid_time to prove versions
The newperpetual_distribution_last_paid_timefield inDriveTokenProveMethodVersionsaligns the prove methods with the existing fetch versions for perpetual distributions.packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs (1)
118-122: Introduce token_perpetual_distribution_last_claim version bound
Added thetoken_perpetual_distribution_last_claimentry intoken_queriesto enable versioning control for the new perpetual distribution last claim gRPC query.packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs (1)
35-35: Initialize perpetual_distribution_last_paid_time in prove method versions
Set the initial version ofperpetual_distribution_last_paid_timeto0inDRIVE_TOKEN_METHOD_VERSIONS_V1, matching the fetch method's version baseline.packages/rs-platform-version/src/version/mocks/v2_test.rs (1)
256-260: Sync mock platform version with new token perp. distribution query
Added mocktoken_perpetual_distribution_last_claimversion bounds inTEST_PLATFORM_V2, ensuring test vectors reflect the new perpetual distribution last claim feature.packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs (1)
53-53: Add verification version for perpetual_distribution_last_paid_time
Includedverify_token_perpetual_distribution_last_paid_timeinDriveVerifyTokenMethodVersionswith initial version0to support proof verification of the new feature.packages/rs-drive-abci/src/query/service.rs (2)
44-44: Import addition for the new query types is well-placedThe additional import for the new query request and response types is correctly placed with other platform types.
769-779: Properly implemented query handler methodThe implementation of
get_token_perpetual_distribution_last_claimfollows the established pattern for query handlers in this file, correctly delegating to the platform query method and using thehandle_blocking_queryhelper for consistent error handling, metrics, and tracing.packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/mod.rs (3)
171-172: Improved clarity in Linear distribution formula documentationThe formula has been updated to clearly show the relationship between variables in the linear distribution function. This documentation change correctly represents the actual implementation.
375-376: Clarified Exponential distribution formula documentationThe formula has been updated to explicitly show how the variables interact in the exponential distribution function. Using
e^notation makes it clear that this is using the natural exponential function.
434-435: Clarified Logarithmic distribution formula documentationThe formula has been updated to specify
ln(natural logarithm) rather than a genericlog, which removes potential ambiguity about which logarithm base is being used. This matches the actual implementation behavior.packages/rs-drive/src/drive/tokens/distribution/prove/perpetual_distribution_last_paid_moment/v0/mod.rs (1)
1-46: Well-implemented proof generation for last paid momentThis method correctly implements the proof generation for token perpetual distribution last paid moments, following best practices:
- Comprehensive documentation explaining the purpose and parameters
- Proper use of the token path construction helper function
- Correct error handling for platform version mismatches
- Follows the versioning pattern established in the codebase
The implementation leverages
grove_get_proved_path_queryto generate cryptographic proofs for the specified path query, enabling verification of claimed distribution moments.packages/rs-drive/src/drive/tokens/distribution/fetch/perpetual_distribution_last_paid_moment/mod.rs (1)
49-94: Well-implemented raw data fetching methodThe addition of
fetch_perpetual_distribution_last_paid_moment_rawis well-designed and implemented:
- Comprehensive documentation clearly describes the method's purpose, parameters, and return values
- Proper version dispatching based on platform version configuration
- Clean error handling for unknown versions with informative error messages
- Follows the same pattern as other fetch methods in the codebase
This method complements the existing structured data fetching method by providing access to the raw bytes, which is particularly useful for proof generation scenarios when the raw data format is needed.
packages/rs-drive/src/drive/tokens/distribution/prove/perpetual_distribution_last_paid_moment/mod.rs (1)
16-61: Well-implemented proof generation with proper version handling.The implementation follows established patterns with two well-structured methods:
- A public convenience wrapper that handles vector allocation for callers
- An internal version-switching method with proper error handling
Both methods correctly implement the proof generation capabilities required for token perpetual distribution last claim features.
packages/rs-drive-abci/src/query/token_queries/token_perpetual_distribution_last_claim/v0/mod.rs (1)
51-60:prove=truesilently ignorescontract_infoWhen the caller sets
prove = true, any suppliedcontract_infois discarded.
From the API consumer’s perspective it’s unclear whether:
- proofs cannot be combined with typed decoding, or
- the parameter was just overlooked.
Please either:
- document this constraint in the proto comments & server logs, or
- support “prove and decode” by verifying the proof and then decoding the proven value.
packages/rs-drive-abci/src/query/token_queries/token_perpetual_distribution_last_claim/mod.rs (5)
1-15: Well-structured imports and module organization.The imports are properly organized, clearly separating standard library imports from crate-specific imports, and the new v0 module is declared correctly.
16-23: Excellent function documentation and signature design.The query method is well-documented with a clear purpose statement and follows the established pattern for Platform query methods, accepting a versioned request and returning a versioned response.
24-30: Proper error handling for missing version.The code correctly handles the case when no version is provided in the request, returning a descriptive error message through the QueryValidationResult pattern.
32-52: Robust version validation logic.The implementation properly extracts version bounds from the platform configuration and performs thorough version validation, returning detailed error information when the version is unsupported.
54-67: Clean version-specific dispatch implementation.The version dispatch pattern is well-implemented, correctly mapping the input version to the appropriate handler and wrapping the response in the expected versioned envelope.
packages/rs-drive/src/drive/tokens/distribution/queries.rs (3)
1-5: Appropriate imports for the new functionality.The imports are well-organized and include the necessary path functions and Drive struct needed for the implementation.
29-85: Good refactoring of the existing query function.The existing
pre_programmed_distributions_queryfunction has been correctly refactored into a Drive implementation method while preserving its original functionality and comprehensive documentation.
87-115: Well-designed query function for perpetual distribution last paid moment.The new
perpetual_distribution_last_paid_moment_queryfunction is concisely implemented with clear documentation explaining its purpose, parameters, return value, and usage scenarios. The query construction follows established patterns and correctly targets the specific path and key needed.packages/rs-drive/src/verify/tokens/verify_token_perpetual_distribution_last_paid_time/mod.rs (3)
1-14: Well-organized module structure and imports.The module declaration and imports are clean and properly organized, separating the versioned implementation and importing only what's needed.
15-45: Thorough documentation for the verification method.The function documentation is excellent, clearly explaining the purpose, parameters, return values, and potential errors. The documentation follows the established pattern in the codebase.
46-75: Well-implemented verification method with proper version dispatching.The implementation correctly dispatches to version-specific handlers based on the platform version, with appropriate error handling for unsupported versions. The function signature matches the documented behavior, and the error messages are descriptive.
...ages/rs-drive-abci/src/query/token_queries/token_perpetual_distribution_last_claim/v0/mod.rs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
packages/rs-drive-abci/src/query/token_queries/token_perpetual_distribution_last_claim/v0/mod.rs (1)
135-138:⚠️ Potential issuePotential epoch overflow when casting to
u32
RewardDistributionMoment::EpochBasedMoment(epoch)yields au64. Blindly casting tou32will wrap values ≥2^32, returning incorrect epochs.RewardDistributionMoment::EpochBasedMoment(epoch) => { - last_claim_info::PaidAt::Epoch(epoch as u32) + if epoch > u32::MAX as u64 { + return Ok(QueryValidationResult::new_with_error( + QueryError::InvalidArgument(format!( + "epoch {} exceeds uint32 range", epoch + )), + )); + } + last_claim_info::PaidAt::Epoch(epoch as u32) }
🧹 Nitpick comments (3)
packages/rs-drive-abci/src/query/token_queries/token_perpetual_distribution_last_claim/v0/mod.rs (3)
23-50: Consider adding documentation for this public function.This new query method would benefit from doc comments explaining its purpose, parameters, and return values to improve maintainability and developer experience.
+/// Retrieves the last claim information for a token's perpetual distribution. +/// +/// # Parameters +/// * `token_id` - The identifier of the token +/// * `contract_info` - Optional contract token information +/// * `identity_id` - The identifier of the identity requesting claim info +/// * `prove` - Flag to generate cryptographic proof +/// * `platform_state` - Current platform state +/// * `platform_version` - Platform version information +/// +/// # Returns +/// Query validation result containing either the response data or an error pub(super) fn query_token_perpetual_distribution_last_claim_v0( &self, GetTokenPerpetualDistributionLastClaimRequestV0 {
95-101: Consider using a more descriptive error message for token position validation.The current error message states the upper bound but doesn't explain why this limitation exists.
if token_contract_position > u16::MAX as u32 { return Ok(QueryValidationResult::new_with_error( QueryError::InvalidArgument( - "token_contract_position must be less than u16::MAX".to_string(), + format!("token_contract_position must be less than {} due to internal type constraints", u16::MAX), ), )); }
148-167: Consider adding a comment explaining the purpose of the raw data branch.It's not immediately clear why we would want to fetch raw bytes instead of using the typed response. Adding a brief comment would improve code readability.
} else { + // When contract info is not provided, fetch and return raw bytes + // This allows clients to handle the data format themselves let paid_at = self .drive .fetch_perpetual_distribution_last_paid_moment_raw(
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/rs-drive-abci/src/query/token_queries/token_perpetual_distribution_last_claim/v0/mod.rs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/mimic/test_quorum.rs:159-164
Timestamp: 2024-11-20T16:16:01.830Z
Learning: QuantumExplorer prefers not to receive auto-generated messages asking to post on social media.
⏰ Context from checks skipped due to timeout of 90000ms (17)
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-dpp) / Unused dependencies
- GitHub Check: Rust packages (drive) / Tests
- GitHub Check: Rust packages (drive) / Formatting
- GitHub Check: Rust packages (drive) / Linting
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpp) / Formatting
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
🔇 Additional comments (3)
packages/rs-drive-abci/src/query/token_queries/token_perpetual_distribution_last_claim/v0/mod.rs (3)
1-22: Imports look well-organized and appropriate for the query implementation.The imports cover all necessary components for handling requests, responses, validation, and data access.
51-69: The proof generation logic is well-implemented.The code properly handles generating cryptographic proof for the last paid moment when the prove flag is set, providing good support for verifiable queries.
1-171: Verify functionality with integration testsAccording to the PR description, this feature hasn't been tested yet. Consider adding integration tests to verify the end-to-end functionality of this query, including all three branches (proof generation, contract info-based query, and raw data query).
Do you need assistance creating test cases for this new query functionality?
Issue being fixed or feature implemented
We needed the ability to see the current token rewards that a user would get if they had tokens to claim. To do this we needed the last time they claimed to be queryable.
What was done?
Created the query to get latest claim.
How Has This Been Tested?
Not tested yet.
Breaking Changes
None
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit
New Features
Documentation
Chores