Skip to content

chore(SC-059): remove dead DataKey chunk variants; update ADR-0002#437

Merged
devEunicee merged 1 commit into
devEunicee:mainfrom
georgeefaith:chore/237-remove-dead-chunk-keys
Jun 27, 2026
Merged

chore(SC-059): remove dead DataKey chunk variants; update ADR-0002#437
devEunicee merged 1 commit into
devEunicee:mainfrom
georgeefaith:chore/237-remove-dead-chunk-keys

Conversation

@georgeefaith

Copy link
Copy Markdown
Contributor

Summary

Closes #237

Removes four DataKey variants that were defined in types.rs but never written or read by any contract function (storage.rs, lib.rs):

Removed variant Reason
MerchantPaymentChunk(Address, u32) Superseded by flat MerchantPayments list
MerchantPaymentCount(Address) Paired with above, also dead
PayerPaymentChunk(Address, u32) Superseded by flat PayerPayments list
PayerPaymentCount(Address) Paired with above, also dead

Also removes the duplicate undocumented MerchantPayments, PayerPayments, and GlobalPaymentIndex entries that were left alongside the documented ones from the same migration.

Verification

grep -r 'MerchantPaymentChunk\|MerchantPaymentCount\|PayerPaymentChunk\|PayerPaymentCount' contracts/
# → no matches

Docs

ADR-0002 updated to:

  • Document the chunked approach as a considered-and-rejected option
  • Note that the dead variants were removed in SC-059

Removes four dead DataKey variants that were defined but never used:
  - MerchantPaymentChunk(Address, u32)
  - MerchantPaymentCount(Address)
  - PayerPaymentChunk(Address, u32)
  - PayerPaymentCount(Address)

Also removes the duplicate MerchantPayments / PayerPayments / GlobalPaymentIndex
entries that were left behind from the chunked-to-flat migration.

Verified: grep confirms zero remaining references in storage.rs and lib.rs.

ADR-0002 updated to document the chunked approach as a considered-and-rejected
option and to note when/why the dead variants were removed.

Closes devEunicee#237
@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@georgeefaith 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

@devEunicee devEunicee merged commit e23093e into devEunicee:main Jun 27, 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.

SC-059 · Chunked payment index keys (MerchantPaymentChunk) are dead code

2 participants