docs(period): fix #220 specify canonical u64 YYYYMM period format - #624
Open
heqmah wants to merge 1 commit into
Open
docs(period): fix #220 specify canonical u64 YYYYMM period format#624heqmah wants to merge 1 commit into
heqmah wants to merge 1 commit into
Conversation
|
@heqmah Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
heqmah
force-pushed
the
docs/issue-220-period-format-contract
branch
from
August 1, 2026 19:37
635f61f to
8217aaa
Compare
Author
|
@zintarh please kindly review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #220
This Pull Request addes a strict period format contract to the repository documentation and interface definitions.
Context & Problem
Previously, integrations and references had inconsistencies regarding how time periods were represented. Some older scripts/documents referenced arbitrary string symbols such as
dec2025, while testing frameworks and core logic used numeric representations (e.g.202512). This lack of a canonical format caused confusion for external integrations, frontends, indexers, and developers designing transaction payloads.Solution & Design
We formally document that the period parameter is defined as a
u64(unsigned 64-bit integer) representing calendar months using the strictYYYYMMconvention (e.g.202401for January 2024,202512for December 2025).The design includes:
YYYYMM), valid year range (2024-2100), and valid month range (01-12).period / 100) and modulo (period % 100) arithmetic to save gas compared to string parsing.YYYYMMu64value before generating cryptographic signatures and calling the contract.This change ensures a single, unambiguous specification for both on-chain contract logic and off-chain indexer/relayer services.
Changed
periodto specify the canonicalu64type, detailed theYYYYMMmonthly validation rules, and added a section describing the mapping strategy for non-monthly periods.u64cryptographic payload requirements and provided detailed mapping examples for quarterly, weekly, and daily wraps.