pub fn grant_delegation<T: Config>(
delegator_key: T::AccountId,
proof: MultiSignature,
add_provider_payload: AddProvider,
)Expand description
Creates a new Delegation for an existing MSA, with origin as the Provider and delegator_key is the delegator.
Since it is being sent on the Delegator’s behalf, it requires the Delegator to authorize the new Delegation.
§Remarks
- Origin MUST be the provider
- Signatures should be over the
AddProviderstruct
§Events
§Errors
Error::AddProviderSignatureVerificationFailed-origin’s MSA ID does not equaladd_provider_payload.authorized_msa_id.Error::DuplicateProvider- there is already a Delegation fororiginMSA anddelegator_keyMSA.Error::UnauthorizedProvider-add_provider_payload.authorized_msa_iddoes not match MSA ID ofdelegator_key.Error::InvalidSelfProvider- Cannot delegate to the same MSAError::InvalidSignature-proofverification fails;delegator_keymust have signedadd_provider_payloadError::NoKeyExists- there is no MSA fororiginordelegator_key.Error::ProviderNotRegistered- the a non-provider MSA is used as the providerError::UnauthorizedDelegator- Origin attempted to add a delegate for someone else’s MSA
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::grant_delegation.