Skip to content

refactor(contracts): consolidate GRACE_PERIOD into mergefi-common (Fixes #874, #877) - #893

Closed
kleitonbernardino-lab wants to merge 1 commit into
MergeFi:mainfrom
kleitonbernardino-lab:fix/consolidate-grace-period-874
Closed

kleitonbernardino-lab wants to merge 1 commit into
MergeFi:mainfrom
kleitonbernardino-lab:fix/consolidate-grace-period-874

Conversation

@kleitonbernardino-lab

Copy link
Copy Markdown

Summary

Fixes #874, #877.

Consolidates the protocol-level GRACE_PERIOD constant into mergefi-common alongside existing shared constants (BPS_DENOMINATOR, MAX_SPONSORS, MAX_RECIPIENTS, MAX_SPONSORS_LIMIT, MAX_FEE_CHANGE_BPS), and documents the architectural rationale for keeping CONTRACT_VERSION scoped per contract.

Rationale

Changes

  1. Declare pub const GRACE_PERIOD: u64 = 14 * 24 * 60 * 60; in contracts/common/src/lib.rs.
  2. Replace local declarations in contracts/escrow/src/lib.rs and contracts/milestones/src/lib.rs with pub use mergefi_common::GRACE_PERIOD;.
  3. Add ### Independent Contract Versioning section to docs/upgrade-storage-migration-design.md.

Verification

  • Verified constant value matches across all modules (14 * 24 * 60 * 60 = 1,209,600s).
  • Verified get_grace_period entrypoints return the re-exported constant.
  • Checked git diff to confirm atomic changes across all 4 files.

 MergeFi#874, MergeFi#877)

Signed-off-by: Kleiton Bernardino <kleiton.bernardino@gmail.com>
@vercel

vercel Bot commented Nov 12, 2026

Copy link
Copy Markdown

@kleitonbernardino-lab is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@chonilius chonilius closed this Nov 12, 2026
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.

The three contracts declare GRACE_PERIOD and CONTRACT_VERSION independently instead of in mergefi-common, where the shared constants already live

2 participants