pub fn mng_is_admin(contract_id: ContractId, principal: Principal) -> bool
Expand description

Checks if the provided principal is admin of the contract.

§Parameters

  • contract_id: Target contract id.
  • principal: Principal to check.

§Result

Bool value indicating whether the principal is admin or not.

§Sample request

CONTRACT_ID=863_687_411_142_147_496_529_845_239_809_006_400_526_886_408_362
PRINCIPAL='principal "dimdt-vwpm3-tkwgu-c2nkv-txykr-atn2x-xras5-6xidt-wtti3-i4xr6-vqe"'

dfx canister call coreledger_backend mng_is_admin "($CONTRACT_ID, $PRINCIPAL)"

§Sample response

(false)