diff --git a/Cargo.lock b/Cargo.lock index 3f8cb4ed..201d648a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5864,7 +5864,6 @@ dependencies = [ "ink 5.1.1", "parity-scale-codec", "propchain-traits", - "proptest", "scale-info", ] diff --git a/contracts/escrow/src/lib.rs b/contracts/escrow/src/lib.rs index a61f9874..20586c68 100644 --- a/contracts/escrow/src/lib.rs +++ b/contracts/escrow/src/lib.rs @@ -78,6 +78,9 @@ mod propchain_escrow { fee_rate_bps: u16, /// Fee recipient account fee_recipient: Option, + /// Escrow analytics data + analytics: EscrowAnalytics, + /// Unique participant tracking for analytics /// Aggregated escrow analytics for dashboard display analytics: EscrowAnalytics, /// Tracks unique participants: AccountId -> bool @@ -344,12 +347,12 @@ mod propchain_escrow { large_transfer_requests: Mapping::default(), large_transfer_request_count: 0, escrow_active_large_transfer: Mapping::default(), - // 0 means "use global constant from propchain_traits::constants" large_transfer_threshold: 0, very_large_transfer_threshold: 0, tax_compliance_contract, fee_rate_bps: 0, fee_recipient: None, + analytics: EscrowAnalytics::default(), analytics: EscrowAnalytics { total_created: 0, total_released: 0, diff --git a/contracts/escrow/src/types.rs b/contracts/escrow/src/types.rs index 014f1717..6b7cb8f5 100644 --- a/contracts/escrow/src/types.rs +++ b/contracts/escrow/src/types.rs @@ -223,4 +223,24 @@ pub struct EscrowAnalytics { pub total_disputes_resolved: u64, /// Number of unique participants (buyers + sellers) pub unique_participants: u64, -} \ No newline at end of file +} + +impl Default for EscrowAnalytics { + fn default() -> Self { + Self { + total_created: 0, + total_released: 0, + total_refunded: 0, + total_disputed: 0, + total_active: 0, + total_volume: 0, + total_released_volume: 0, + total_fees_collected: 0, + average_escrow_amount: 0, + average_dispute_resolution_time: 0, + total_disputes_resolved: 0, + unique_participants: 0, + } + } +} +} diff --git a/contracts/staking/src/tests.rs b/contracts/staking/src/tests.rs index e75bc3d6..00d0ab95 100644 --- a/contracts/staking/src/tests.rs +++ b/contracts/staking/src/tests.rs @@ -1566,5 +1566,4 @@ fn set_early_withdrawal_penalty_max_cap() { assert_eq!(vesting_after_claim.claimable_at_block(200), 0); assert_eq!(vesting_after_claim.claimable_at_block(300), 500); } -}