class RequestServiceImpl implements RequestService {

    @Override
    @Transactional
    @CacheEvict(value = {"projects", "technologies"}, key = "'all'")
    public Request requestClaimed(RequestClaimedCommand command) {
        final Request request = updateStatus(requestRepository.findByPlatformAndPlatformId(command.getPlatform(), command.getPlatformId())
                                                              .orElseThrow(ResourceNotFoundException::new),
                                             RequestStatus.CLAIMED);
        Claim claim = claimRepository.save(ClaimBuilder.aClaim()
                                                       .withRequestId(request.getId())
                                                       .withSolver(command.getSolver())
                                                       .withTimestamp(command.getTimestamp())
                                                       .withTokenValue(TokenValue.builder()
                                                                                 .tokenAddress(command.getTokenHash())
                                                                                 .amountInWei(command.getAmountInWei())
                                                                                 .build())
                                                       .withBlockchainEventId(command.getBlockchainEventId())
                                                       .build());

        eventPublisher.publishEvent(RequestClaimedEvent.builder()
                                                       .blockchainEventId(command.getBlockchainEventId())
                                                       .requestDto(mappers.map(Request.class, RequestDto.class, request))
                                                       .claimDto(mappers.map(Claim.class, ClaimDto.class, claim))
                                                       .solver(command.getSolver())
                                                       .timestamp(command.getTimestamp())
                                                       .build());
        return request;
    }

    public  RequestServiceImpl(final RequestRepository requestRepository,
                              final Mappers mappers,
                              final GithubPlatformIdParser githubLinkParser,
                              final ProfileService profileService,
                              final ClaimRepository claimRepository,
                              final GithubGateway githubGateway,
                              final GithubClaimResolver githubClaimResolver,
                              final ApplicationEventPublisher eventPublisher,
                              final Erc67Generator erc67Generator,
                              final Environment environment);

}