pub async fn led_base_activate_asset(
    contract_id: ContractId,
    asset_id: AssetId,
    hash: Nat,
    bitwise: bool,
    controller: Option<ContractId>
) -> Response
Expand description

Activates the asset. Only then tokens can be created.

§Parameters

  • contract_id: Contract id of the ledger.
  • asset_id: Locally unique asset identifier (needs ledger to be globally unique).
  • hash: Keccak256 hash of the documentation.
  • bitwise: Whether an asset is traded bit by bit (makes only 256 non-fungible “tokens” possible.
  • controller: Optional compliance contract. Will fail if has value, but ledger is not KYC.

§Result

  • tx_id: Id of the transaction.

§Sample request

LEDGER_CONTRACT_ID=1_376_994_832_725_996_537_612_682_825_051_864_610_558_585_037_795
ASSET_ID=0xF94E2AD9DD5CBBC04143
ASSET_HASH=0x1234
BITWISE=false
CONTROLLER_ID=706_061_983_514_303_969_782_027_186_938_462_951_048_586_994_629

dfx canister call coreledger_backend led_base_activate_asset "($LEDGER_CONTRACT_ID, $ASSET_ID, $ASSET_HASH, $BITWISE, $CONTROLLER_ID)"

§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
})