Skip to content

feat: monolith split plan, event migration, storage TTL audit, overflow audit - #1557

Merged
yusuftomilola merged 1 commit into
DistinctCodes:mainfrom
NteinPrecious:feat/sc-08-split-monolith-sc-09-event-migration-sc-10-storage-ttl-sc-11-overflow-audit
Jul 27, 2026
Merged

feat: monolith split plan, event migration, storage TTL audit, overflow audit#1557
yusuftomilola merged 1 commit into
DistinctCodes:mainfrom
NteinPrecious:feat/sc-08-split-monolith-sc-09-event-migration-sc-10-storage-ttl-sc-11-overflow-audit

Conversation

@NteinPrecious

@NteinPrecious NteinPrecious commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Closes #1524, Closes #1525, Closes #1526, Closes #1527

  • SC-08: Monolith split plan with extracted membership_token + staking_rewards crates
  • SC-09: Migrated deprecated env.events().publish() to #[contractevent]
  • SC-10: Storage TTL audit with extend_ttl on all persistent write paths
  • SC-11: Overflow audit with checked_* for financial arithmetic

…erflow audit

- SC-08: Created MONOLITH_SPLIT_PLAN.md identifying 6 extraction groups
  with dependency graph and phased approach; expanded membership_token
  crate with full token/transfer/metadata/renewal/pause logic; created
  staking_rewards crate; added 4 stub crates (subscription_tier,
  attendance_batch, token_upgrade, pause_control)

- SC-09: Created EVENT_MIGRATION.md with full inventory of all event
  publish calls across all 5 contracts, migration patterns, and priority
  recommendations; added #[contractevent] annotations to resource_credits
  (CreditsMinted, CreditsTransferred, CreditsSpent) and workspace_booking
  (ContractInitialized, WorkspaceRegistered, WorkspaceAvailabilityChanged,
  WorkspaceRateChanged, WorkspaceBooked, BookingCancelled, BookingCompleted)

- SC-10: Created STORAGE_AUDIT.md documenting all persistent storage
  entries across all contracts; added TTL bump/extend_ttl calls to every
  persistent write path in resource_credits, workspace_booking,
  membership_token (standalone + monolith), subscription, attendance_log,
  fractionalization, staking, staking_rewards, and upgrade modules

- SC-11: Created OVERFLOW_AUDIT.md documenting all arithmetic operations;
  replaced unchecked arithmetic with checked_add/checked_mul in
  resource_credits and workspace_booking; replaced += with saturating_add
  for analytics counters in subscription, version increments in
  membership_token, and duration accumulators in attendance_log

Closes DistinctCodes#1524, DistinctCodes#1525, DistinctCodes#1526, DistinctCodes#1527
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

@BigBen-7 is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@NteinPrecious 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! 🚀

Learn more about application limits

@yusuftomilola yusuftomilola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Impressive architectural improvements! Monolith split planning, event migration, storage TTL audit, and overflow audit show strong attention to scalability and security.

@yusuftomilola
yusuftomilola merged commit 75d8309 into DistinctCodes:main Jul 27, 2026
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants