Skip to content
Merged

done #409

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions contracts/rent-escrow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,17 @@ pub enum DataKey {
Contributions(Address),
}

/// Tracks an individual roommate's rent obligation and payment progress.
///
/// Stored per-roommate in the escrow using `DataKey::Escrow` inside the
/// `RentEscrow.roommates` map, keyed by the roommate's `Address`.
/// Status of the escrow, mapped to simple integers for storage efficiency.
#[contracttype]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[repr(u32)]
pub enum Status {
Open = 0,
Funded = 1,
Released = 2,
Refunded = 3,
}

#[contracttype]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RoommateState {
Expand Down
Loading