Reusable implementation of the contract administrator
type storage = ...
Admin storage type.
type entrypoints = ...
Admin entry points type type.
let fail_if_not_admin (storage : storage) : unit = ...
Admin guard function. Fails if a sender is not an admin.
let fail_if_not_admin_ext (storage, extra_msg : storage * string) : unit = ...
Extended admin guard function. Fails if a sender is not an admin with a custom message.
let is_admin (storage : storage) : bool = ...
Admin guard function. Returns true
if a sender is an admin.
let fail_if_paused (storage : storage) : unit = ...
A guard function that fails if the contract is paused.
let main(param, storage : entrypoints * storage)
: (operation list) * storage = ...
Implementation of the admin entry points defined by the entrypoints
type.
Admin privileged operations should be already guarded.