Skip to content

Implement core token storage layout #1

Description

@Nemenwa

Description:
Define and implement the foundational storage layout for the property-token contract. This is the first and most critical issue for the property-token contract — all subsequent issues depend on it.
Context:
The property token contract represents fractional ownership of a real estate asset. Each deployed instance of this contract represents one property. Token holders own a percentage of that property proportional to their token balance.
Storage keys to implement (in storage.rs):
rust// Persistent storage (survives state archival)
const ADMIN: Symbol = symbol_short!("ADMIN");
const PROPERTY_ID: Symbol = symbol_short!("PROP_ID");
const TOTAL_SUPPLY: Symbol = symbol_short!("TOTAL_SUP");
const PROPERTY_METADATA: Symbol = symbol_short!("META");
const COMPLIANCE_CONTRACT: Symbol = symbol_short!("COMPLY");

// Instance storage (cheaper, not archived)
const BALANCE: Symbol = symbol_short!("BALANCE");
const ALLOWANCE: Symbol = symbol_short!("ALLOWANCE");
const WHITELIST: Symbol = symbol_short!("WLIST");
Types to define (in types.rs):
rustpub struct PropertyMetadata {
pub property_id: String, // Unique identifier
pub title_number: String, // Government title deed number
pub location: String, // Human-readable location
pub country_code: String, // ISO 3166-1 alpha-2
pub valuation_usd: i128, // Property valuation in USD cents
pub ipfs_document_hash: String,// IPFS hash of legal docs
pub created_at: u64, // Ledger timestamp
}
Acceptance criteria:

All storage keys defined as constants (no magic strings anywhere)
PropertyMetadata struct is serialisable/deserialisable with Soroban's contracttype
Storage read/write helper functions implemented for every key
Unit tests for all storage helpers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions