Skip to main content

quota_whole_request

Function quota_whole_request 

Source
pub fn quota_whole_request(
    requested: u64,
    total: u64,
    units_per_token: u64,
) -> u64
Expand description

Convert a whole-token request to storage units, limited by the whole tokens the balance holds.

Saturating the multiplication cannot grant a fractional token or reduce the largest representable whole-token grant.

ยงPanics

Panics if units_per_token is zero.