pub fn locked_amount_at_timestamp(&self, timestamp: u64) -> Uint128 {
        if self.is_void_or_undefined() || self.expired_at_timestamp(timestamp) {
            return Uint128::zero();
        }

        // Doing subtraction from deposited_amount in order to make sure we overestimate locked amount
        // instead of underestimating it.
        Uint128::try_from(
            Uint256::from(self.deposited_amount)
                - Uint256::from(self.deposited_amount)
                    * Decimal256::from_ratio(
                        Uint128::from(self.elapsed_lock_time_at_timestamp(timestamp)),
                        // Denominator is always positive
                        Uint128::from(self.initial_lock_duration()),
                    ),
        )
        .unwrap()
    }
/// Get the remaining locked_amount for a point at a given timestamp
/// At start_lock_time time, the locked amount equals the deposited amount
/// At end_lock_time time, the locked amount is 0
Get the remaining locked_amount for a point at a given timestamp
At start_lock_time time, the locked amount equals the deposited amount
At end_lock_time time, the locked amount is 0
Get the remaining locked_amount for a point at a given timestamp At start_lock_time time the locked amount equals the deposited amount At end_lock_time time the locked amount is 0
pub fn locked_amount_at_timestamp(&self, timestamp: u64) -> Uint128 {
        if self.is_void_or_undefined() || self.expired_at_timestamp(timestamp) {
            return Uint128::zero();
        }
        // Doing subtraction from deposited_amount in order to make sure we overestimate locked amount
        // instead of underestimating it.
        Uint128::try_from(
            Uint256::from(self.deposited_amount)
                - Uint256::from(self.deposited_amount)
                    * Decimal256::from_ratio(
                        Uint128::from(self.elapsed_lock_time_at_timestamp(timestamp)),
                        // Denominator is always positive
                        Uint128::from(self.initial_lock_duration()),
                    ),
        )
        .unwrap()
    }
pub fn locked_amount_at_timestamp ( & self , timestamp : u64 ) -> Uint128 { if self . is_void_or_undefined ( ) || self . expired_at_timestamp ( timestamp ) { return Uint128 :: zero ( ) ; } // Doing subtraction from deposited_amount in order to make sure we overestimate locked amount // instead of underestimating it. Uint128 :: try_from ( Uint256 :: from ( self . deposited_amount ) - Uint256 :: from ( self . deposited_amount ) * Decimal256 :: from_ratio ( Uint128 :: from ( self . elapsed_lock_time_at_timestamp ( timestamp ) ) , // Denominator is always positive Uint128 :: from ( self . initial_lock_duration ( ) ) , ) , ) . unwrap ( ) }
Get the remaining locked_amount for a point at a given timestamp
At start_lock_time time, the locked amount equals the deposited amount
At end_lock_time time, the locked amount is 0
Get the remaining locked_amount for a point at a given timestamp At start_lock_time time the locked amount equals the deposited amount At end_lock_time time the locked amount is 0
&self
timestamp
u64