Skip to content

refactor: alien-gateway extract storage key builders into storage.rs #302

@ryzen-xp

Description

@ryzen-xp

📝 Description

Storage keys like vec![Symbol::new(env, StellarAddress), address] are constructed inline. Any typo creates a silent wrong key. Create alien_gateway/storage.rs with stellar_address_key(addr), smt_root_key(), owner_key(), username_key(), created_at_key() helpers.

✅ Requirements

  • Storage keys like vec![Symbol::new(env, StellarAddress), address] are constructed inline
  • Any typo creates a silent wrong key
  • Create alien_gateway/storage.rs with stellar_address_key(addr), smt_root_key(), owner_key(), username_key(), created_at_key() helpers.

🎯 Acceptance Criteria

  • Implementation matches the description above
  • Tests added or updated to cover the new behaviour
  • cargo test and cargo clippy pass with no warnings
  • CI (Smart Contracts CI) passes

📁 Expected files to change

  • gateway-contract/contracts/core_contract/src/lib.rs
  • gateway-contract/contracts/core_contract/src/test.rs

💬 Commit: refactor: alien-gateway extract storage key builders into storage.rs
🌿 Branch: refactor/alien-gateway-extract-storage-key-builders-into-st | Priority: LOW | Difficulty: ☕ one-coffee


Type: Refactor · Priority: LOW · Difficulty: ☕ one-coffee · Track: Contract

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions