CatapultServer  v0.5.0.1 (Elephant)
MosaicRecipientValidator.cpp File Reference
Include dependency graph for MosaicRecipientValidator.cpp:

Namespaces

 catapult
 
 catapult::validators
 

Functions

 catapult::validators::DEFINE_STATEFUL_VALIDATOR (MosaicRecipient, [](const auto &notification, const ValidatorContext &context) { AccountRestrictionView view(context.Cache);if(!view.initialize(context.Resolvers.resolve(notification.Recipient))) return ValidationResult::Success;auto mosaicId=context.Resolvers.resolve(notification.MosaicId);auto isTransferAllowed=view.isAllowed(model::AccountRestrictionType::MosaicId, mosaicId);return isTransferAllowed ? ValidationResult::Success :Failure_RestrictionAccount_Mosaic_Transfer_Not_Allowed;})