pub fn ctr_validate_usage_controller(controller: Option<ContractId>) -> bool
Expand description

Validates if a usage controller contract really exists and listens to the expected functions.

To avoid that function calls just go into the void, producing random results, there is a protocol, which mandates that the compliance functions - if called with all parameters empty or 0 - return 2. Otherwise - if the parameters are not empty - they will return either 0 = false or 1 = true.

§Parameters

  • controller: Optional contract id of the controller to validate.

§Sample request

CONTROLLER_ID=706_061_983_514_303_969_782_027_186_938_462_951_048_586_994_629

dfx canister call coreledger_backend ctr_validate_usage_controller "(opt $CONTROLLER_ID)"

§Sample response

(true)