pub fn create_hierarchy<T: Config>(
    root_node_id: DelegationNodeIdOf<T>,
    ctype_hash: CtypeHashOf<T>
)
Expand description

Create a new delegation root associated with a given CType hash.

The new root will allow a new trust hierarchy to be created by adding children delegations to the root.

There must be no delegation with the same ID stored on chain, while there must be already a CType with the given hash stored in the CType pallet.

The dispatch origin must be split into

  • a submitter of type AccountId who is responsible for paying the transaction fee and
  • a DID subject of type DelegationEntityId who creates, owns and can revoke the delegation.

Requires the sender of the transaction to have a reservable balance of at least Deposit many tokens.

Emits RootCreated.

Weight: O(1)

  • Reads: [Origin Account], Roots, CTypes
  • Writes: Roots

Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::create_hierarchy.