Skip to content

Add helper for deriving the storage key for a creator's holder balance #577

Description

@Chucks1093

Summary

The storage key for a creator's holder balance is constructed inline in multiple places across the contract. A shared helper should produce this key consistently so any future key format change only needs to be made in one place.

Scope

  • Add holder_balance_key(creator_id: Address, holder: Address) -> Symbol helper
  • Replace all inline holder balance key constructions with the helper
  • Add unit tests confirming the helper produces the expected key format for two different creator/holder pairs

Acceptance Criteria

  • Helper produces correct key format
  • All inline constructions replaced
  • Unit tests for two distinct creator/holder pairs
  • Key format consistent with existing stored data (no migration needed)

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions