Trait common_primitives::msa::DelegationValidator
source · pub trait DelegationValidator {
type BlockNumber;
type MaxSchemaGrantsPerDelegation: Get<u32>;
type SchemaId;
// Required method
fn ensure_valid_delegation(
provider: ProviderId,
delegator: DelegatorId,
block_number: Option<Self::BlockNumber>
) -> Result<Delegation<Self::SchemaId, Self::BlockNumber, Self::MaxSchemaGrantsPerDelegation>, DispatchError>;
}
Expand description
A behavior that allows for validating a delegator-provider relationship
Required Associated Types§
sourcetype BlockNumber
type BlockNumber
Type for block number.
sourcetype MaxSchemaGrantsPerDelegation: Get<u32>
type MaxSchemaGrantsPerDelegation: Get<u32>
Type for maximum number of schemas that can be granted to a provider.
Required Methods§
sourcefn ensure_valid_delegation(
provider: ProviderId,
delegator: DelegatorId,
block_number: Option<Self::BlockNumber>
) -> Result<Delegation<Self::SchemaId, Self::BlockNumber, Self::MaxSchemaGrantsPerDelegation>, DispatchError>
fn ensure_valid_delegation( provider: ProviderId, delegator: DelegatorId, block_number: Option<Self::BlockNumber> ) -> Result<Delegation<Self::SchemaId, Self::BlockNumber, Self::MaxSchemaGrantsPerDelegation>, DispatchError>
Validates that the delegator and provider have a relationship at this point
Object Safety§
This trait is not object safe.