Macro elrond_wasm::only_owner [−][src]
Very compact way of not allowing anyone but the owner to call a function.
It can only be used in a function that returns SCResult<_>
where _ can be any type.
fn only_callable_by_owner(&self) -> SCResult<()> { only_owner!(self, "Caller must be owner"); Ok(()) }