Skip to main content

ensure_owner

Function ensure_owner 

Source
pub fn ensure_owner<T, E>(
    owner: &T,
    sender: &Addr,
    unauthorized: impl FnOnce() -> E,
) -> Result<(), E>
where T: OwnerAddress + ?Sized,
Expand description

Verifies that sender is the owner and returns a caller-provided unauthorized error otherwise.