@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; }