pub fn apply_royalty_cost<Y, V>(
    api: &mut Y,
    royalty_amount: RoyaltyAmount,
    recipient: RoyaltyRecipient
) -> Result<(), RuntimeError>