From 3cde883dd72fc215ea7006c53c5646fa51309d09 Mon Sep 17 00:00:00 2001 From: 6r1d Date: Mon, 8 Jan 2024 09:47:32 +0200 Subject: [PATCH] [docs]: Remove CanMintUserAssetDefinitions (#460) Signed-off-by: 6r1d --- src/reference/permissions.md | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/reference/permissions.md b/src/reference/permissions.md index dac95f1b8..61bb712e4 100644 --- a/src/reference/permissions.md +++ b/src/reference/permissions.md @@ -15,7 +15,6 @@ The following permission tokens are pre-configured in Iroha 2: | [`CanRemoveKeyValueInUserAssets`](#canremovekeyvalueinuserassets) | Asset | Remove key value | | [`CanTransferUserAssets`](#cantransferuserassets) | Asset | Transfer | | [`CanTransferOnlyFixedNumberOfTimesPerPeriod`](#cantransferonlyfixednumberoftimesperperiod) | Asset | Transfer | -| [`CanMintUserAssetDefinitions`](#canmintuserassetdefinitions) | Asset Definition | Mint | | [`CanBurnAssetWithDefinition`](#canburnassetwithdefinition) | Asset Definition | Burn | | [`CanUnregisterAssetWithDefinition`](#canunregisterassetwithdefinition) | Asset Definition | Unregister | | [`CanSetKeyValueInAssetDefinition`](#cansetkeyvalueinassetdefinition) | Asset Definition | Set key value | @@ -29,33 +28,6 @@ won't be pre-configured permissions in the future. ::: -### `CanMintUserAssetDefinitions` - -With `CanMintUserAssetDefinitions`, a user can register and mint assets -with the corresponding asset definition. - -```rust -let mut genesis = RawGenesisBlock::new( - "alice".parse(), - "wonderland".parse(), - get_key_pair().public_key().clone(), -); -let rose_definition_id = - AssetDefinitionId::from_str("rose#wonderland")?; -let alice_id = - AccountId::from_str("alice@wonderland")?; - -// Create a new `CanMintUserAssetDefinitions` permission token -// to mint rose assets (`rose_definition_id`) -let mint_rose_permission: PermissionToken = - CanMintUserAssetDefinitions::new(rose_definition_id).into(); - -// Grant Alice permission to mint rose assets -genesis.transactions[0] - .isi - .push(GrantBox::new(mint_rose_permission, alice_id).into()); -``` - ### `CanBurnAssetWithDefinition` With `CanBurnAssetWithDefinition` permission token, a user can burn and