pub async fn ctr_create_controller(
    deployment_code: String,
    owner: Principal
) -> Response<ContractId>
Expand description

Creates a new controller.

§Parameters

  • deployment_code: Deployment code.
  • owner: Owner of the controller.

§Result

  • tx_id: Id of the transaction.
  • data: Contract id of the created controller.

§Sample request

CTRL_DEP_CODE=0x56
OWNER=(principal "r63pu-qjqo3-yvyrr-xhymp-63lj4-oycfx-7r4yr-mspkh-guhdl-vrjkr-cae")

dfx canister call coreledger_backend ctr_create_controller "(\"$CTRL_DEP_CODE\", $OWNER)"

§Sample response

( record {
  tx_id = 64_902_045_878_680_215_161_103_406_576_570_366_475_824_533_393_005_533_149_888_825_789_042_550_227_580 : nat;
  data = 661_775_148_057_113_927_808_845_362_593_863_528_366_359_627_916 : nat;
})