Skip to content

refactor(token): optimize DataKey storage layout#156

Open
Richiey1 wants to merge 1 commit into
BCPathway:mainfrom
Richiey1:fix/storage-optimization
Open

refactor(token): optimize DataKey storage layout#156
Richiey1 wants to merge 1 commit into
BCPathway:mainfrom
Richiey1:fix/storage-optimization

Conversation

@Richiey1
Copy link
Copy Markdown

This PR optimizes the DataKey storage layout in the token contract to reduce gas consumption and storage fees on Soroban.

Summary of changes:

  • Assigned explicit, small integer discriminants to all DataKey enum variants. This ensures that the storage keys use the most compact representation possible.
  • Cleaned up redundant variants and dead code in the lib.rs file to improve maintainability and further reduce the contract size.
  • Verified logic consistency for allowances and balances.

Closes #70

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

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

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.

[Contract] Optimize Storage Keys for Gas Reduction

1 participant