pub fn ctr_get_make_supply(
    controller_id: ContractId,
    owner: Principal,
    offered_unique_asset_id: UniqueAssetId,
    desired_unique_asset_id: UniqueAssetId,
    amount: u256
) -> u8
Expand description

Checks if the address is allowed to create the supply.

§Parameters

  • controller_id: Target controller contract id.
  • owner: Address of the suply owner.
  • offered_unique_asset_id: Unique id of the offered asset.
  • desired_unique_asset_id: Unique id of the desired asset.
  • amount: Amount of supply.

§Result

0 - not allowed. 1 - allowed. 2 - incorrect input.

§Sample request

CONTROLLER_ID=706_061_983_514_303_969_782_027_186_938_462_951_048_586_994_629
SUPPLY_OWNER='principal "enelt-vu2ic-5z4vq-mt7jb-4lxpn-75hu7-2rm6l-akmq5-tlzog-st72l-cae"'
UNIQUE_ASSET_ID_1=0xF94E2AD9DD5CBBC041430001
UNIQUE_ASSET_ID_2=0x123E2AD9DD5CBBC043210001
AMOUNT=100

dfx canister call coreledger_backend ctr_get_make_supply "($CONTROLLER_ID, $SUPPLY_OWNER, $UNIQUE_ASSET_ID_1, $UNIQUE_ASSET_ID_2, $AMOUNT)"

§Sample response

(0 : nat8)