1 | package org.cardanofoundation.explorer.api.service.impl; | |
2 | ||
3 | import java.math.BigInteger; | |
4 | import java.time.Instant; | |
5 | import java.time.LocalDate; | |
6 | import java.time.LocalDateTime; | |
7 | import java.time.LocalTime; | |
8 | import java.time.OffsetDateTime; | |
9 | import java.time.ZoneOffset; | |
10 | import java.util.ArrayList; | |
11 | import java.util.Arrays; | |
12 | import java.util.Collections; | |
13 | import java.util.Comparator; | |
14 | import java.util.Date; | |
15 | import java.util.HashMap; | |
16 | import java.util.LinkedHashMap; | |
17 | import java.util.List; | |
18 | import java.util.Map; | |
19 | import java.util.Objects; | |
20 | import java.util.Optional; | |
21 | import java.util.Set; | |
22 | import java.util.function.Function; | |
23 | import java.util.stream.Collectors; | |
24 | import java.util.stream.Stream; | |
25 | ||
26 | import lombok.RequiredArgsConstructor; | |
27 | import lombok.extern.log4j.Log4j2; | |
28 | ||
29 | import org.springframework.beans.factory.annotation.Value; | |
30 | import org.springframework.data.domain.Page; | |
31 | import org.springframework.data.domain.PageImpl; | |
32 | import org.springframework.data.domain.PageRequest; | |
33 | import org.springframework.data.domain.Pageable; | |
34 | import org.springframework.data.domain.Sort; | |
35 | import org.springframework.data.redis.core.RedisTemplate; | |
36 | import org.springframework.data.util.Pair; | |
37 | import org.springframework.stereotype.Service; | |
38 | import org.springframework.transaction.annotation.Transactional; | |
39 | import org.springframework.util.CollectionUtils; | |
40 | import org.springframework.util.ObjectUtils; | |
41 | ||
42 | import com.bloxbean.cardano.client.api.util.AssetUtil; | |
43 | import com.bloxbean.cardano.client.crypto.Blake2bUtil; | |
44 | import com.bloxbean.cardano.client.util.HexUtil; | |
45 | import com.fasterxml.jackson.core.JsonProcessingException; | |
46 | import com.fasterxml.jackson.databind.JsonNode; | |
47 | import com.fasterxml.jackson.databind.ObjectMapper; | |
48 | import org.apache.commons.lang3.StringUtils; | |
49 | ||
50 | import org.cardanofoundation.explorer.api.common.constant.CommonConstant; | |
51 | import org.cardanofoundation.explorer.api.common.enumeration.CertificateType; | |
52 | import org.cardanofoundation.explorer.api.common.enumeration.TxChartRange; | |
53 | import org.cardanofoundation.explorer.api.common.enumeration.TxStatus; | |
54 | import org.cardanofoundation.explorer.api.exception.BusinessCode; | |
55 | import org.cardanofoundation.explorer.api.mapper.*; | |
56 | import org.cardanofoundation.explorer.api.model.response.BaseFilterResponse; | |
57 | import org.cardanofoundation.explorer.api.model.response.TxFilterResponse; | |
58 | import org.cardanofoundation.explorer.api.model.response.dashboard.TxGraph; | |
59 | import org.cardanofoundation.explorer.api.model.response.dashboard.TxSummary; | |
60 | import org.cardanofoundation.explorer.api.model.response.pool.PoolRelayResponse; | |
61 | import org.cardanofoundation.explorer.api.model.response.pool.projection.PoolDeRegistrationProjection; | |
62 | import org.cardanofoundation.explorer.api.model.response.pool.projection.PoolRelayProjection; | |
63 | import org.cardanofoundation.explorer.api.model.response.pool.projection.PoolUpdateDetailProjection; | |
64 | import org.cardanofoundation.explorer.api.model.response.pool.projection.StakeKeyProjection; | |
65 | import org.cardanofoundation.explorer.api.model.response.token.TokenAddressResponse; | |
66 | import org.cardanofoundation.explorer.api.model.response.tx.*; | |
67 | import org.cardanofoundation.explorer.api.projection.*; | |
68 | import org.cardanofoundation.explorer.api.projection.AddressInputOutputProjection; | |
69 | import org.cardanofoundation.explorer.api.projection.TxContractProjection; | |
70 | import org.cardanofoundation.explorer.api.projection.TxGraphProjection; | |
71 | import org.cardanofoundation.explorer.api.projection.TxIOProjection; | |
72 | import org.cardanofoundation.explorer.api.repository.ledgersync.AssetMetadataRepository; | |
73 | import org.cardanofoundation.explorer.api.repository.ledgersync.BlockRepository; | |
74 | import org.cardanofoundation.explorer.api.repository.ledgersync.DelegationRepository; | |
75 | import org.cardanofoundation.explorer.api.repository.ledgersync.EpochParamRepository; | |
76 | import org.cardanofoundation.explorer.api.repository.ledgersync.EpochRepository; | |
77 | import org.cardanofoundation.explorer.api.repository.ledgersync.FailedTxOutRepository; | |
78 | import org.cardanofoundation.explorer.api.repository.ledgersync.MaTxMintRepository; | |
79 | import org.cardanofoundation.explorer.api.repository.ledgersync.MultiAssetRepository; | |
80 | import org.cardanofoundation.explorer.api.repository.ledgersync.ParamProposalRepository; | |
81 | import org.cardanofoundation.explorer.api.repository.ledgersync.PoolRelayRepository; | |
82 | import org.cardanofoundation.explorer.api.repository.ledgersync.PoolRetireRepository; | |
83 | import org.cardanofoundation.explorer.api.repository.ledgersync.PoolUpdateRepository; | |
84 | import org.cardanofoundation.explorer.api.repository.ledgersync.RedeemerRepository; | |
85 | import org.cardanofoundation.explorer.api.repository.ledgersync.ReferenceTxInRepository; | |
86 | import org.cardanofoundation.explorer.api.repository.ledgersync.ReserveRepository; | |
87 | import org.cardanofoundation.explorer.api.repository.ledgersync.StakeAddressRepository; | |
88 | import org.cardanofoundation.explorer.api.repository.ledgersync.StakeDeRegistrationRepository; | |
89 | import org.cardanofoundation.explorer.api.repository.ledgersync.StakeRegistrationRepository; | |
90 | import org.cardanofoundation.explorer.api.repository.ledgersync.TokenTxCountRepository; | |
91 | import org.cardanofoundation.explorer.api.repository.ledgersync.TreasuryRepository; | |
92 | import org.cardanofoundation.explorer.api.repository.ledgersync.TxBootstrapWitnessesRepository; | |
93 | import org.cardanofoundation.explorer.api.repository.ledgersync.TxChartRepository; | |
94 | import org.cardanofoundation.explorer.api.repository.ledgersync.TxMetadataRepository; | |
95 | import org.cardanofoundation.explorer.api.repository.ledgersync.TxOutRepository; | |
96 | import org.cardanofoundation.explorer.api.repository.ledgersync.TxRepository; | |
97 | import org.cardanofoundation.explorer.api.repository.ledgersync.TxWitnessesRepository; | |
98 | import org.cardanofoundation.explorer.api.repository.ledgersync.UnconsumeTxInRepository; | |
99 | import org.cardanofoundation.explorer.api.repository.ledgersync.WithdrawalRepository; | |
100 | import org.cardanofoundation.explorer.api.repository.ledgersyncagg.AddressRepository; | |
101 | import org.cardanofoundation.explorer.api.repository.ledgersyncagg.AddressTxAmountRepository; | |
102 | import org.cardanofoundation.explorer.api.repository.ledgersyncagg.AddressTxCountRepository; | |
103 | import org.cardanofoundation.explorer.api.repository.ledgersyncagg.StakeAddressTxCountRepository; | |
104 | import org.cardanofoundation.explorer.api.service.BolnisiMetadataService; | |
105 | import org.cardanofoundation.explorer.api.service.ProtocolParamService; | |
106 | import org.cardanofoundation.explorer.api.service.TxService; | |
107 | import org.cardanofoundation.explorer.api.util.*; | |
108 | import org.cardanofoundation.explorer.common.entity.ledgersync.*; | |
109 | import org.cardanofoundation.explorer.common.entity.ledgersyncsagg.AddressTxAmount; | |
110 | import org.cardanofoundation.explorer.common.entity.ledgersyncsagg.AddressTxCount; | |
111 | import org.cardanofoundation.explorer.common.entity.ledgersyncsagg.StakeAddressTxCount; | |
112 | import org.cardanofoundation.explorer.common.exception.BusinessException; | |
113 | ||
114 | @Service | |
115 | @RequiredArgsConstructor | |
116 | @Log4j2 | |
117 | public class TxServiceImpl implements TxService { | |
118 | ||
119 | private final TxRepository txRepository; | |
120 | private final TxOutRepository txOutRepository; | |
121 | private final BlockRepository blockRepository; | |
122 | private final TxMapper txMapper; | |
123 | private final TxOutMapper txOutMapper; | |
124 | private final TokenMapper tokenMapper; | |
125 | private final RedeemerRepository redeemerRepository; | |
126 | private final EpochRepository epochRepository; | |
127 | private final UnconsumeTxInRepository unconsumeTxInRepository; | |
128 | private final FailedTxOutRepository failedTxOutRepository; | |
129 | private final WithdrawalRepository withdrawalRepository; | |
130 | private final AddressRepository addressRepository; | |
131 | private final WithdrawalMapper withdrawalMapper; | |
132 | private final DelegationRepository delegationRepository; | |
133 | private final DelegationMapper delegationMapper; | |
134 | private final MaTxMintRepository maTxMintRepository; | |
135 | private final MaTxMintMapper maTxMintMapper; | |
136 | private final AddressTxAmountRepository addressTxAmountRepository; | |
137 | private final MultiAssetRepository multiAssetRepository; | |
138 | private final AddressTxCountRepository addressTxCountRepository; | |
139 | private final StakeAddressTxCountRepository stakeAddressTxCountRepository; | |
140 | private final AssetMetadataRepository assetMetadataRepository; | |
141 | private final AssetMetadataMapper assetMetadataMapper; | |
142 | private final StakeRegistrationRepository stakeRegistrationRepository; | |
143 | private final StakeDeRegistrationRepository stakeDeRegistrationRepository; | |
144 | private final PoolUpdateRepository poolUpdateRepository; | |
145 | private final PoolRelayRepository poolRelayRepository; | |
146 | private final PoolRetireRepository poolRetireRepository; | |
147 | private final ParamProposalRepository paramProposalRepository; | |
148 | private final EpochParamRepository epochParamRepository; | |
149 | private final ProtocolMapper protocolMapper; | |
150 | private final TxChartRepository txChartRepository; | |
151 | private final TreasuryRepository treasuryRepository; | |
152 | private final ReserveRepository reserveRepository; | |
153 | private final StakeAddressRepository stakeAddressRepository; | |
154 | private final TxContractMapper txContractMapper; | |
155 | private final TxMetadataRepository txMetadataRepository; | |
156 | private final TxWitnessesRepository txWitnessesRepository; | |
157 | private final TxBootstrapWitnessesRepository txBootstrapWitnessesRepository; | |
158 | private final ProtocolParamService protocolParamService; | |
159 | private final ReferenceTxInRepository referenceTxInRepository; | |
160 | private final TxReferenceInputMapper txReferenceInputMapper; | |
161 | private final BolnisiMetadataService bolnisiMetadataService; | |
162 | ||
163 | private final RedisTemplate<String, TxGraph> redisTemplate; | |
164 | private static final int SUMMARY_SIZE = 4; | |
165 | public static final long DAYS_IN_MONTH = 32; | |
166 | public static final long DAYS_IN_THREE_MONTH = 93; | |
167 | public static final long MONTHS_IN_YEAR = 12; | |
168 | public static final long MONTHS_IN_THREE_YEAR = MONTHS_IN_YEAR * 3; | |
169 | private static final long DAY_STEP_EPOCH_SECOND = 86400; | |
170 | private static final long MONTH_STEP_EPOCH_SECOND = 2592000; | |
171 | private static final String UNIT_LOVELACE = "lovelace"; | |
172 | private final TokenTxCountRepository tokenTxCountRepository; | |
173 | ||
174 | @Value("${application.network}") | |
175 | private String network; | |
176 | ||
177 | @Override | |
178 | public List<TxSummary> findLatestTxSummary() { | |
179 | List<Long> txIds = | |
180 | txRepository.findLatestTxId( | |
181 | PageRequest.of( | |
182 | BigInteger.ZERO.intValue(), SUMMARY_SIZE, Sort.by(BaseEntity_.ID).descending())); | |
183 | ||
184 |
1
1. findLatestTxSummary : negated conditional → KILLED |
if (txIds.isEmpty()) { |
185 | return Collections.emptyList(); | |
186 | } | |
187 | ||
188 | List<TxSummary> summaries = new ArrayList<>(); | |
189 | List<TxIOProjection> txs = txRepository.findLatestTxIO(txIds); | |
190 | ||
191 |
1
1. findLatestTxSummary : removed call to java/util/List::forEach → KILLED |
txs.forEach( |
192 | tx -> { | |
193 | Optional<TxSummary> searchedSummary = | |
194 | summaries.stream() | |
195 |
2
1. lambda$findLatestTxSummary$0 : replaced boolean return with false for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$findLatestTxSummary$0 → NO_COVERAGE 2. lambda$findLatestTxSummary$0 : replaced boolean return with true for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$findLatestTxSummary$0 → NO_COVERAGE |
.filter(summary -> summary.getHash().equals(tx.getHash())) |
196 | .findFirst(); | |
197 | ||
198 |
1
1. lambda$findLatestTxSummary$1 : negated conditional → KILLED |
if (searchedSummary.isEmpty()) { |
199 | ||
200 | final var from = new ArrayList<String>(); | |
201 | from.add(tx.getFromAddress()); | |
202 | ||
203 | final var to = new ArrayList<String>(); | |
204 | to.add(tx.getToAddress()); | |
205 | ||
206 | final TxSummary summary = | |
207 | TxSummary.builder() | |
208 | .blockNo(tx.getBlockNo()) | |
209 | .hash(tx.getHash()) | |
210 | .amount(tx.getAmount().doubleValue()) | |
211 | .fromAddress(from) | |
212 | .toAddress(to) | |
213 | .epochNo(tx.getEpochNo()) | |
214 | .epochSlotNo(tx.getEpochSlotNo()) | |
215 | .slot(tx.getSlot()) | |
216 | .time(tx.getTime()) | |
217 | .status( | |
218 |
1
1. lambda$findLatestTxSummary$1 : negated conditional → KILLED |
Boolean.TRUE.equals(tx.getValidContract()) |
219 | ? TxStatus.SUCCESS | |
220 | : TxStatus.FAILED) | |
221 | .build(); | |
222 | summaries.add(summary); | |
223 | return; | |
224 | } | |
225 | ||
226 | final TxSummary summary = searchedSummary.get(); | |
227 |
1
1. lambda$findLatestTxSummary$1 : negated conditional → NO_COVERAGE |
if (!summary.getFromAddress().contains(tx.getFromAddress())) { |
228 | summary.getFromAddress().add(tx.getFromAddress()); | |
229 | } | |
230 | ||
231 |
1
1. lambda$findLatestTxSummary$1 : negated conditional → NO_COVERAGE |
if (!summary.getToAddress().contains(tx.getToAddress())) { |
232 | summary.getToAddress().add(tx.getToAddress()); | |
233 | } | |
234 | }); | |
235 | ||
236 |
1
1. findLatestTxSummary : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::findLatestTxSummary → KILLED |
return summaries; |
237 | } | |
238 | ||
239 | @Override | |
240 | // @SingletonCall(typeToken = TypeTokenGson.TX_CHART, expireAfterSeconds = 300) | |
241 | public List<TxGraph> getTransactionChartByRange(TxChartRange range) { | |
242 |
1
1. getTransactionChartByRange : negated conditional → KILLED |
if (range.equals(TxChartRange.ONE_YEAR)) { |
243 |
1
1. getTransactionChartByRange : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionChartByRange → KILLED |
return getTransactionChartInMonthRange(MONTHS_IN_YEAR); |
244 | } | |
245 | ||
246 |
1
1. getTransactionChartByRange : negated conditional → KILLED |
if (range.equals(TxChartRange.THREE_YEAR)) { |
247 |
1
1. getTransactionChartByRange : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionChartByRange → KILLED |
return getTransactionChartInMonthRange(MONTHS_IN_THREE_YEAR); |
248 | } | |
249 | ||
250 |
1
1. getTransactionChartByRange : negated conditional → KILLED |
if (range.equals(TxChartRange.ALL_TIME)) { |
251 |
1
1. getTransactionChartByRange : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionChartByRange → KILLED |
return getTransactionChartInAllRange(); |
252 | } | |
253 | ||
254 | long day = DAYS_IN_MONTH; | |
255 | ||
256 |
1
1. getTransactionChartByRange : negated conditional → KILLED |
if (range.equals(TxChartRange.THREE_MONTH)) { |
257 | day = DAYS_IN_THREE_MONTH; | |
258 | } | |
259 |
1
1. getTransactionChartByRange : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionChartByRange → KILLED |
return getTransactionChartInRange(day); |
260 | } | |
261 | ||
262 | @Override | |
263 | public BaseFilterResponse<TxFilterResponse> getAll(Pageable pageable) { | |
264 | Page<Tx> txPage = txRepository.findAllTx(pageable); | |
265 |
1
1. getAll : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getAll → KILLED |
return new BaseFilterResponse<>(txPage, mapDataFromTxListToResponseList(txPage)); |
266 | } | |
267 | ||
268 | @Override | |
269 | public BaseFilterResponse<TxFilterResponse> getTransactionsByBlock( | |
270 | String blockId, Pageable pageable) { | |
271 | Page<Tx> txPage; | |
272 | try { | |
273 | Long blockNo = Long.parseLong(blockId); | |
274 | txPage = txRepository.findByBlockNo(blockNo, pageable); | |
275 | } catch (NumberFormatException e) { | |
276 | txPage = txRepository.findByBlockHash(blockId, pageable); | |
277 | } | |
278 |
1
1. getTransactionsByBlock : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionsByBlock → KILLED |
return new BaseFilterResponse<>(txPage, mapDataFromTxListToResponseList(txPage)); |
279 | } | |
280 | ||
281 | @Override | |
282 | public BaseFilterResponse<TxFilterResponse> getTransactionsByAddress( | |
283 | String address, Pageable pageable) { | |
284 | addressRepository | |
285 | .findFirstByAddress(address) | |
286 |
1
1. lambda$getTransactionsByAddress$2 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getTransactionsByAddress$2 → NO_COVERAGE |
.orElseThrow(() -> new BusinessException(BusinessCode.ADDRESS_NOT_FOUND)); |
287 | ||
288 | AddressTxCount addressTxCount = | |
289 | addressTxCountRepository.findById(address).orElse(new AddressTxCount(address, 0L)); | |
290 | ||
291 | List<TxProjection> txProjections = | |
292 | addressTxAmountRepository.findAllTxByAddress(address, pageable); | |
293 | List<String> txHashes = txProjections.stream().map(TxProjection::getTxHash).toList(); | |
294 | List<AddressTxAmount> addressTxAmounts = | |
295 | addressTxAmountRepository.findAllByAddressAndTxHashIn(address, txHashes); | |
296 | ||
297 | Page<TxFilterResponse> txFilterResponsePage = | |
298 | new PageImpl<>( | |
299 | mapTxDataFromAddressTxAmount(txProjections, addressTxAmounts), | |
300 | pageable, | |
301 | addressTxCount.getTxCount()); | |
302 | ||
303 |
1
1. getTransactionsByAddress : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionsByAddress → NO_COVERAGE |
return new BaseFilterResponse<>(txFilterResponsePage); |
304 | } | |
305 | ||
306 | private List<TxFilterResponse> mapTxDataFromAddressTxAmount( | |
307 | List<TxProjection> txProjections, List<AddressTxAmount> addressTxAmounts) { | |
308 | ||
309 | List<TxFilterResponse> txFilterResponses = new ArrayList<>(); | |
310 | List<String> txHashes = txProjections.stream().map(TxProjection::getTxHash).toList(); | |
311 | ||
312 | Map<String, Tx> txMap = | |
313 | txRepository.findAllByHashIn(txHashes).stream() | |
314 | .collect(Collectors.toMap(Tx::getHash, Function.identity())); | |
315 | ||
316 | List<MultiAsset> multiAssets = | |
317 | multiAssetRepository.findAllByUnitIn( | |
318 | addressTxAmounts.stream().map(AddressTxAmount::getUnit).collect(Collectors.toSet())); | |
319 | ||
320 | Map<Long, Block> blockMap = | |
321 | blockRepository | |
322 | .findAllByIdIn(txMap.values().stream().map(Tx::getBlockId).collect(Collectors.toList())) | |
323 | .stream() | |
324 | .collect(Collectors.toMap(Block::getId, Function.identity())); | |
325 | ||
326 | Map<String, MultiAsset> unitMultiAssetMap = | |
327 | multiAssets.stream().collect(Collectors.toMap(MultiAsset::getUnit, Function.identity())); | |
328 | ||
329 | Map<String, AssetMetadata> fingerprintAssetMetadataMap = | |
330 | assetMetadataRepository | |
331 | .findByFingerprintIn( | |
332 | multiAssets.stream().map(MultiAsset::getFingerprint).collect(Collectors.toSet())) | |
333 | .stream() | |
334 | .collect(Collectors.toMap(AssetMetadata::getFingerprint, Function.identity())); | |
335 | ||
336 | Map<String, Map<String, List<AddressTxAmount>>> addressTxAmountMap = | |
337 | addressTxAmounts.stream() | |
338 | .collect( | |
339 | Collectors.groupingBy( | |
340 | AddressTxAmount::getTxHash, Collectors.groupingBy(AddressTxAmount::getUnit))); | |
341 | ||
342 |
1
1. mapTxDataFromAddressTxAmount : removed call to java/util/List::forEach → NO_COVERAGE |
txProjections.forEach( |
343 | txProjection -> { | |
344 | TxFilterResponse txFilterResponse = new TxFilterResponse(); | |
345 | Tx tx = txMap.get(txProjection.getTxHash()); | |
346 | String txHash = tx.getHash(); | |
347 | Block block = blockMap.get(tx.getBlockId()); | |
348 | BigInteger balance = | |
349 | addressTxAmountMap.get(txHash).get(UNIT_LOVELACE).stream() | |
350 |
1
1. lambda$mapTxDataFromAddressTxAmount$3 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$mapTxDataFromAddressTxAmount$3 → NO_COVERAGE |
.reduce(BigInteger.ZERO, (a, b) -> a.add(b.getQuantity()), BigInteger::add); |
351 | ||
352 | List<AddressTxAmount> tokenQuantityChange = | |
353 | addressTxAmountMap.get(txHash).entrySet().stream() | |
354 |
2
1. lambda$mapTxDataFromAddressTxAmount$4 : negated conditional → NO_COVERAGE 2. lambda$mapTxDataFromAddressTxAmount$4 : replaced boolean return with true for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$mapTxDataFromAddressTxAmount$4 → NO_COVERAGE |
.filter(entry -> !entry.getKey().equals(UNIT_LOVELACE)) |
355 |
1
1. lambda$mapTxDataFromAddressTxAmount$5 : replaced return value with Stream.empty for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$mapTxDataFromAddressTxAmount$5 → NO_COVERAGE |
.flatMap(entry -> entry.getValue().stream()) |
356 | .collect(Collectors.toList()); | |
357 | ||
358 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : removed call to org/cardanofoundation/explorer/api/model/response/TxFilterResponse::setHash → NO_COVERAGE |
txFilterResponse.setHash(txHash); |
359 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : removed call to org/cardanofoundation/explorer/api/model/response/TxFilterResponse::setTime → NO_COVERAGE |
txFilterResponse.setTime(block.getTime().toLocalDateTime()); |
360 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : removed call to org/cardanofoundation/explorer/api/model/response/TxFilterResponse::setBlockNo → NO_COVERAGE |
txFilterResponse.setBlockNo(block.getBlockNo()); |
361 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : removed call to org/cardanofoundation/explorer/api/model/response/TxFilterResponse::setEpochNo → NO_COVERAGE |
txFilterResponse.setEpochNo(block.getEpochNo()); |
362 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : negated conditional → NO_COVERAGE |
if (block.getSlotNo() != null) { |
363 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : removed call to org/cardanofoundation/explorer/api/model/response/TxFilterResponse::setSlot → NO_COVERAGE |
txFilterResponse.setSlot(block.getSlotNo().intValue()); |
364 | } | |
365 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : removed call to org/cardanofoundation/explorer/api/model/response/TxFilterResponse::setEpochSlotNo → NO_COVERAGE |
txFilterResponse.setEpochSlotNo(block.getEpochSlotNo()); |
366 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : removed call to org/cardanofoundation/explorer/api/model/response/TxFilterResponse::setFee → NO_COVERAGE |
txFilterResponse.setFee(tx.getFee()); |
367 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : removed call to org/cardanofoundation/explorer/api/model/response/TxFilterResponse::setBalance → NO_COVERAGE |
txFilterResponse.setBalance(balance); |
368 |
1
1. lambda$mapTxDataFromAddressTxAmount$6 : removed call to org/cardanofoundation/explorer/api/model/response/TxFilterResponse::setTokens → NO_COVERAGE |
txFilterResponse.setTokens( |
369 | getTokenQuantityChangeResponse( | |
370 | tokenQuantityChange, unitMultiAssetMap, fingerprintAssetMetadataMap)); | |
371 | ||
372 | txFilterResponses.add(txFilterResponse); | |
373 | }); | |
374 | ||
375 |
1
1. mapTxDataFromAddressTxAmount : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::mapTxDataFromAddressTxAmount → NO_COVERAGE |
return txFilterResponses; |
376 | } | |
377 | ||
378 | private List<TokenAddressResponse> getTokenQuantityChangeResponse( | |
379 | List<AddressTxAmount> tokenQuantityChange, | |
380 | Map<String, MultiAsset> unitMultiAssetMap, | |
381 | Map<String, AssetMetadata> fingerprintAssetMetadataMap) { | |
382 | ||
383 | List<TokenAddressResponse> tokenAddressResponses = new ArrayList<>(); | |
384 |
1
1. getTokenQuantityChangeResponse : removed call to java/util/List::forEach → NO_COVERAGE |
tokenQuantityChange.forEach( |
385 | addressTxAmount -> { | |
386 |
1
1. lambda$getTokenQuantityChangeResponse$7 : negated conditional → NO_COVERAGE |
if (BigInteger.ZERO.equals(addressTxAmount.getQuantity())) { |
387 | return; | |
388 | } | |
389 | MultiAsset multiAsset = unitMultiAssetMap.get(addressTxAmount.getUnit()); | |
390 | TokenAddressResponse tokenAddressResponse = new TokenAddressResponse(); | |
391 |
1
1. lambda$getTokenQuantityChangeResponse$7 : negated conditional → NO_COVERAGE |
if (!Objects.isNull(multiAsset)) { |
392 | tokenAddressResponse = | |
393 | tokenMapper.fromMultiAssetAndAddressToken(multiAsset, addressTxAmount); | |
394 |
1
1. lambda$getTokenQuantityChangeResponse$7 : removed call to org/cardanofoundation/explorer/api/model/response/token/TokenAddressResponse::setMetadata → NO_COVERAGE |
tokenAddressResponse.setMetadata( |
395 | assetMetadataMapper.fromAssetMetadata( | |
396 | fingerprintAssetMetadataMap.get(multiAsset.getFingerprint()))); | |
397 | } | |
398 | tokenAddressResponses.add(tokenAddressResponse); | |
399 | }); | |
400 | ||
401 |
1
1. getTokenQuantityChangeResponse : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTokenQuantityChangeResponse → NO_COVERAGE |
return tokenAddressResponses; |
402 | } | |
403 | ||
404 | @Override | |
405 | public BaseFilterResponse<TxFilterResponse> getTransactionsByToken( | |
406 | String tokenId, Pageable pageable) { | |
407 | ||
408 | MultiAsset multiAsset = | |
409 | multiAssetRepository | |
410 | .findByFingerprint(tokenId) | |
411 |
1
1. lambda$getTransactionsByToken$8 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getTransactionsByToken$8 → NO_COVERAGE |
.orElseThrow(() -> new BusinessException(BusinessCode.TOKEN_NOT_FOUND)); |
412 | ||
413 | TokenTxCount tokenTxCount = | |
414 | tokenTxCountRepository | |
415 | .findById(multiAsset.getUnit()) | |
416 | .orElse(TokenTxCount.builder().unit(multiAsset.getUnit()).txCount(0L).build()); | |
417 | ||
418 | List<TxProjection> txsProjection = | |
419 | addressTxAmountRepository.findAllTxByUnit(multiAsset.getUnit(), pageable); | |
420 | ||
421 | Map<String, Tx> txMap = | |
422 | txRepository | |
423 | .findAllByHashIn(txsProjection.stream().map(TxProjection::getTxHash).toList()) | |
424 | .stream() | |
425 | .collect(Collectors.toMap(Tx::getHash, Function.identity())); | |
426 | ||
427 | List<Tx> txs = new ArrayList<>(); | |
428 | for (TxProjection txProjection : txsProjection) { | |
429 |
1
1. getTransactionsByToken : negated conditional → NO_COVERAGE |
if (txMap.containsKey(txProjection.getTxHash())) { |
430 | txs.add(txMap.get(txProjection.getTxHash())); | |
431 | } | |
432 | } | |
433 | ||
434 | Page<Tx> txPage = new PageImpl<>(txs, pageable, tokenTxCount.getTxCount()); | |
435 | ||
436 |
1
1. getTransactionsByToken : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionsByToken → NO_COVERAGE |
return new BaseFilterResponse<>(txPage, mapDataFromTxListToResponseList(txPage)); |
437 | } | |
438 | ||
439 | @Override | |
440 | public BaseFilterResponse<TxFilterResponse> getTransactionsByStake( | |
441 | String stakeKey, Pageable pageable) { | |
442 | ||
443 | stakeAddressRepository | |
444 | .findByView(stakeKey) | |
445 |
1
1. lambda$getTransactionsByStake$9 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getTransactionsByStake$9 → NO_COVERAGE |
.orElseThrow(() -> new BusinessException(BusinessCode.STAKE_ADDRESS_NOT_FOUND)); |
446 | ||
447 | StakeAddressTxCount addressTxCount = | |
448 | stakeAddressTxCountRepository | |
449 | .findById(stakeKey) | |
450 | .orElse(new StakeAddressTxCount(stakeKey, 0L)); | |
451 | ||
452 | List<TxProjection> txProjections = | |
453 | addressTxAmountRepository.findAllTxByStakeAddress(stakeKey, pageable); | |
454 | List<String> txHashes = txProjections.stream().map(TxProjection::getTxHash).toList(); | |
455 | List<AddressTxAmount> addressTxAmounts = | |
456 | addressTxAmountRepository.findAllByStakeAddressAndTxHashIn(stakeKey, txHashes); | |
457 | ||
458 | Page<TxFilterResponse> txFilterResponsePage = | |
459 | new PageImpl<>( | |
460 | mapTxDataFromAddressTxAmount(txProjections, addressTxAmounts), | |
461 | pageable, | |
462 | addressTxCount.getTxCount()); | |
463 | ||
464 |
1
1. getTransactionsByStake : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionsByStake → NO_COVERAGE |
return new BaseFilterResponse<>(txFilterResponsePage); |
465 | } | |
466 | ||
467 | /** | |
468 | * Mapping from tx entity list to tx response dto | |
469 | * | |
470 | * @param txPage list tx in page | |
471 | * @return list tx response | |
472 | */ | |
473 | private List<TxFilterResponse> mapDataFromTxListToResponseList(Page<Tx> txPage) { | |
474 |
1
1. mapDataFromTxListToResponseList : negated conditional → KILLED |
if (CollectionUtils.isEmpty(txPage.getContent())) { |
475 |
1
1. mapDataFromTxListToResponseList : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::mapDataFromTxListToResponseList → SURVIVED |
return new ArrayList<>(); |
476 | } | |
477 | Set<Long> blockIdList = | |
478 | txPage.getContent().stream().map(Tx::getBlockId).collect(Collectors.toSet()); | |
479 | List<Block> blocks = blockRepository.findAllByIdIn(blockIdList); | |
480 | Map<Long, Block> blockMap = | |
481 | blocks.stream().collect(Collectors.toMap(Block::getId, Function.identity())); | |
482 | ||
483 |
1
1. mapDataFromTxListToResponseList : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::mapDataFromTxListToResponseList → KILLED |
return txPage.getContent().stream() |
484 |
1
1. lambda$mapDataFromTxListToResponseList$10 : removed call to org/cardanofoundation/explorer/common/entity/ledgersync/Tx::setBlock → SURVIVED |
.peek(tx -> tx.setBlock(blockMap.get(tx.getBlockId()))) |
485 | .map(txMapper::txToTxFilterResponse) | |
486 | .collect(Collectors.toList()); | |
487 | } | |
488 | ||
489 | private Pair<Map<String, AssetMetadata>, Map<Long, MultiAsset>> getMapMetadataAndMapAsset( | |
490 | List<Long> multiAssetIdList) { | |
491 | List<MultiAsset> multiAssets = multiAssetRepository.findAllByIdIn(multiAssetIdList); | |
492 | Set<String> subjects = | |
493 |
1
1. lambda$getMapMetadataAndMapAsset$11 : replaced return value with "" for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getMapMetadataAndMapAsset$11 → NO_COVERAGE |
multiAssets.stream().map(ma -> ma.getPolicy() + ma.getName()).collect(Collectors.toSet()); |
494 | List<AssetMetadata> assetMetadataList = assetMetadataRepository.findBySubjectIn(subjects); | |
495 | Map<String, AssetMetadata> assetMetadataMap = | |
496 | assetMetadataList.stream() | |
497 | .collect(Collectors.toMap(AssetMetadata::getSubject, Function.identity())); | |
498 | ||
499 | Map<Long, MultiAsset> multiAssetMap = | |
500 | multiAssets.stream().collect(Collectors.toMap(MultiAsset::getId, Function.identity())); | |
501 | ||
502 |
1
1. getMapMetadataAndMapAsset : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getMapMetadataAndMapAsset → NO_COVERAGE |
return Pair.of(assetMetadataMap, multiAssetMap); |
503 | } | |
504 | ||
505 | @Override | |
506 | @Transactional(readOnly = true) | |
507 | public TxResponse getTxDetailByHash(String hash) { | |
508 | Tx tx = | |
509 | txRepository | |
510 | .findByHash(hash) | |
511 |
1
1. lambda$getTxDetailByHash$12 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getTxDetailByHash$12 → KILLED |
.orElseThrow(() -> new BusinessException(BusinessCode.TRANSACTION_NOT_FOUND)); |
512 | Integer currentBlockNo = | |
513 | blockRepository | |
514 | .findCurrentBlock() | |
515 |
1
1. lambda$getTxDetailByHash$13 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getTxDetailByHash$13 → KILLED |
.orElseThrow(() -> new BusinessException(BusinessCode.BLOCK_NOT_FOUND)); |
516 | TxResponse txResponse = txMapper.txToTxResponse(tx); | |
517 | ||
518 |
1
1. getTxDetailByHash : negated conditional → KILLED |
if (Objects.nonNull(txResponse.getTx().getEpochNo())) { |
519 | Epoch epoch = | |
520 | epochRepository | |
521 | .findFirstByNo(txResponse.getTx().getEpochNo()) | |
522 |
1
1. lambda$getTxDetailByHash$14 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getTxDetailByHash$14 → KILLED |
.orElseThrow(() -> new BusinessException(BusinessCode.EPOCH_NOT_FOUND)); |
523 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxInfoResponse::setMaxEpochSlot → NO_COVERAGE |
txResponse.getTx().setMaxEpochSlot(epoch.getMaxSlot()); |
524 | } | |
525 |
1
1. getTxDetailByHash : negated conditional → NO_COVERAGE |
if (Objects.nonNull(txResponse.getTx().getBlockNo())) { |
526 |
2
1. getTxDetailByHash : Replaced integer subtraction with addition → NO_COVERAGE 2. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxInfoResponse::setConfirmation → NO_COVERAGE |
txResponse.getTx().setConfirmation(currentBlockNo - txResponse.getTx().getBlockNo()); |
527 | } else { | |
528 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxInfoResponse::setConfirmation → NO_COVERAGE |
txResponse.getTx().setConfirmation(currentBlockNo); |
529 | } | |
530 | ||
531 | // get address input output | |
532 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getSummaryAndUTxOs → NO_COVERAGE |
getSummaryAndUTxOs(tx, txResponse); |
533 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getCollaterals → NO_COVERAGE |
getCollaterals(tx, txResponse); |
534 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getWithdrawals → NO_COVERAGE |
getWithdrawals(tx, txResponse); |
535 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getDelegations → NO_COVERAGE |
getDelegations(tx, txResponse); |
536 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getMints → NO_COVERAGE |
getMints(tx, txResponse); |
537 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getStakeCertificates → NO_COVERAGE |
getStakeCertificates(tx, txResponse); |
538 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getPoolCertificates → NO_COVERAGE |
getPoolCertificates(tx, txResponse); |
539 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getProtocols → NO_COVERAGE |
getProtocols(tx, txResponse); |
540 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getInstantaneousRewards → NO_COVERAGE |
getInstantaneousRewards(tx, txResponse); |
541 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getMetadata → NO_COVERAGE |
getMetadata(tx, txResponse); |
542 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getSignersInformation → NO_COVERAGE |
getSignersInformation(tx, txResponse); |
543 | /* | |
544 | * If the transaction is invalid, the collateral is the input and the output of the transaction. | |
545 | * Otherwise, the collateral is the input and the output of the collateral. | |
546 | */ | |
547 |
1
1. getTxDetailByHash : negated conditional → NO_COVERAGE |
if (Boolean.TRUE.equals(tx.getValidContract())) { |
548 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxInfoResponse::setStatus → NO_COVERAGE |
txResponse.getTx().setStatus(TxStatus.SUCCESS); |
549 | } else { | |
550 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxInfoResponse::setStatus → NO_COVERAGE |
txResponse.getTx().setStatus(TxStatus.FAILED); |
551 | CollateralResponse collateralResponse = txResponse.getCollaterals(); | |
552 | List<TxOutResponse> collateralInputs = collateralResponse.getCollateralInputResponses(); | |
553 | List<TxOutResponse> collateralOutputs = collateralResponse.getCollateralOutputResponses(); | |
554 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/CollateralResponse::setCollateralInputResponses → NO_COVERAGE |
collateralResponse.setCollateralInputResponses(txResponse.getUTxOs().getInputs()); |
555 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/CollateralResponse::setCollateralOutputResponses → NO_COVERAGE |
collateralResponse.setCollateralOutputResponses(txResponse.getUTxOs().getOutputs()); |
556 | BigInteger totalInput = | |
557 | collateralResponse.getCollateralInputResponses().stream() | |
558 |
1
1. lambda$getTxDetailByHash$15 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getTxDetailByHash$15 → NO_COVERAGE |
.reduce(BigInteger.ZERO, (a, b) -> a.add(b.getValue()), BigInteger::add); |
559 | BigInteger totalOutput = | |
560 | collateralResponse.getCollateralOutputResponses().stream() | |
561 |
1
1. lambda$getTxDetailByHash$16 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getTxDetailByHash$16 → NO_COVERAGE |
.reduce(BigInteger.ZERO, (a, b) -> a.add(b.getValue()), BigInteger::add); |
562 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxInfoResponse::setFee → NO_COVERAGE |
txResponse.getTx().setFee(totalInput.subtract(totalOutput)); |
563 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setCollaterals → NO_COVERAGE |
txResponse.setCollaterals(collateralResponse); |
564 | UTxOResponse uTxOResponse = new UTxOResponse(); | |
565 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/UTxOResponse::setInputs → NO_COVERAGE |
uTxOResponse.setInputs(collateralInputs); |
566 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/UTxOResponse::setOutputs → NO_COVERAGE |
uTxOResponse.setOutputs(collateralOutputs); |
567 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setUTxOs → NO_COVERAGE |
txResponse.setUTxOs(uTxOResponse); |
568 | } | |
569 |
1
1. getTxDetailByHash : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getContracts → NO_COVERAGE |
getContracts(tx, txResponse); |
570 | ||
571 |
1
1. getTxDetailByHash : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTxDetailByHash → NO_COVERAGE |
return txResponse; |
572 | } | |
573 | ||
574 | /** | |
575 | * Get signers (Delegate Keys) Information for MIR (instantaneous rewards) Transaction | |
576 | * | |
577 | * @param tx | |
578 | * @param txResponse | |
579 | */ | |
580 | private void getSignersInformation(Tx tx, TxResponse txResponse) { | |
581 | List<TxWitness> txVkeyWitnesses = txWitnessesRepository.findAllByTx(tx); | |
582 | List<TxBootstrapWitnesses> txBootstrapWitnesses = | |
583 | txBootstrapWitnessesRepository.findAllByTx(tx); | |
584 |
1
1. getSignersInformation : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(txVkeyWitnesses)) { |
585 | Map<Integer, String> signersIndexMap = new HashMap<>(); | |
586 |
1
1. getSignersInformation : removed call to java/util/List::forEach → NO_COVERAGE |
txVkeyWitnesses.forEach( |
587 | txVkeyWitness -> | |
588 | Arrays.stream(txVkeyWitness.getIndexArr()) | |
589 |
1
1. lambda$getSignersInformation$18 : removed call to java/util/stream/Stream::forEach → NO_COVERAGE |
.forEach(index -> signersIndexMap.put(index, txVkeyWitness.getKey()))); |
590 | ||
591 | List<TxSignersResponse> txSignersResponses = | |
592 | Stream.concat( | |
593 | signersIndexMap.entrySet().stream() | |
594 | .sorted(Map.Entry.comparingByKey()) | |
595 | .map( | |
596 |
1
1. lambda$getSignersInformation$19 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getSignersInformation$19 → NO_COVERAGE |
entry -> TxSignersResponse.builder().publicKey(entry.getValue()).build()), |
597 | txBootstrapWitnesses.stream() | |
598 | .map( | |
599 | txBootstrapWitness -> | |
600 |
1
1. lambda$getSignersInformation$20 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getSignersInformation$20 → NO_COVERAGE |
TxSignersResponse.builder() |
601 | .publicKey(txBootstrapWitness.getPublicKey()) | |
602 | .build())) | |
603 | .toList(); | |
604 | ||
605 |
1
1. getSignersInformation : negated conditional → NO_COVERAGE |
if (Objects.nonNull(txResponse.getProtocols()) |
606 |
1
1. getSignersInformation : negated conditional → NO_COVERAGE |
|| !CollectionUtils.isEmpty(txResponse.getInstantaneousRewards())) { |
607 | Map<String, String> dKeyHash224Map = protocolParamService.getGenesisDelegateKeysMap(); | |
608 |
1
1. getSignersInformation : removed call to java/util/List::forEach → NO_COVERAGE |
txSignersResponses.forEach( |
609 | txSignersResponse -> { | |
610 | byte[] pkeyHash224 = | |
611 | Blake2bUtil.blake2bHash224( | |
612 | HexUtil.decodeHexString(txSignersResponse.getPublicKey())); | |
613 | String pkeyHash224Hex = HexUtil.encodeHexString(pkeyHash224); | |
614 |
1
1. lambda$getSignersInformation$21 : negated conditional → NO_COVERAGE |
if (dKeyHash224Map.containsKey(pkeyHash224Hex)) { |
615 |
1
1. lambda$getSignersInformation$21 : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxSignersResponse::setDelegateKey → NO_COVERAGE |
txSignersResponse.setDelegateKey(dKeyHash224Map.get(pkeyHash224Hex)); |
616 | } | |
617 | }); | |
618 | } | |
619 | ||
620 |
1
1. getSignersInformation : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setSignersInformation → NO_COVERAGE |
txResponse.setSignersInformation(txSignersResponses); |
621 | } | |
622 | } | |
623 | ||
624 | /** | |
625 | * Get transaction metadata | |
626 | * | |
627 | * @param tx transaction | |
628 | * @param txResponse response data of transaction | |
629 | */ | |
630 | private void getMetadata(Tx tx, TxResponse txResponse) { | |
631 | List<TxMetadataResponse> txMetadataList = | |
632 | txMetadataRepository.findAllByTxOrderByKeyAsc(tx).stream() | |
633 | .map( | |
634 | txMetadata -> | |
635 |
1
1. lambda$getMetadata$22 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getMetadata$22 → NO_COVERAGE |
TxMetadataResponse.builder() |
636 | .label(txMetadata.getKey()) | |
637 | .value(txMetadata.getJson()) | |
638 | .metadataCIP25( | |
639 |
1
1. lambda$getMetadata$22 : negated conditional → NO_COVERAGE |
txMetadata.getKey().equals(BigInteger.valueOf(721)) |
640 | ? MetadataCIP25Utils.standard(txMetadata.getJson()) | |
641 | : null) | |
642 | .metadataCIP60( | |
643 |
1
1. lambda$getMetadata$22 : negated conditional → NO_COVERAGE |
txMetadata.getKey().equals(BigInteger.valueOf(721)) |
644 | ? MetadataCIP60Utils.standard(txMetadata.getJson()) | |
645 | : null) | |
646 | .metadataCIP20( | |
647 |
1
1. lambda$getMetadata$22 : negated conditional → NO_COVERAGE |
txMetadata.getKey().equals(BigInteger.valueOf(674)) |
648 | ? MetadataCIP20Utils.standard(txMetadata.getJson()) | |
649 | : null) | |
650 | .metadataCIP83( | |
651 |
1
1. lambda$getMetadata$22 : negated conditional → NO_COVERAGE |
txMetadata.getKey().equals(BigInteger.valueOf(674)) |
652 | ? MetadataCIP83Utils.standard(txMetadata.getJson()) | |
653 | : null) | |
654 | .metadataBolnisi( | |
655 |
1
1. lambda$getMetadata$22 : negated conditional → NO_COVERAGE |
txMetadata.getKey().equals(BigInteger.valueOf(1904)) |
656 | ? bolnisiMetadataService.getBolnisiMetadata(txMetadata.getJson()) | |
657 | : null) | |
658 | .build()) | |
659 | .toList(); | |
660 |
1
1. getMetadata : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(txMetadataList)) { |
661 |
1
1. getMetadata : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setMetadata → NO_COVERAGE |
txResponse.setMetadata(txMetadataList); |
662 | } | |
663 |
1
1. getMetadata : negated conditional → NO_COVERAGE |
if (Objects.nonNull(tx.getTxMetadataHash())) { |
664 |
1
1. getMetadata : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setMetadataHash → NO_COVERAGE |
txResponse.setMetadataHash(tx.getTxMetadataHash().getHash()); |
665 | } | |
666 | } | |
667 | ||
668 | /** | |
669 | * Get transaction reserve and treasury | |
670 | * | |
671 | * @param tx transaction | |
672 | * @param txResponse response data of transaction | |
673 | */ | |
674 | private void getInstantaneousRewards(Tx tx, TxResponse txResponse) { | |
675 | var instantaneousRewards = reserveRepository.findByTx(tx); | |
676 | instantaneousRewards.addAll(treasuryRepository.findByTx(tx)); | |
677 |
1
1. getInstantaneousRewards : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(instantaneousRewards)) { |
678 |
1
1. getInstantaneousRewards : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setInstantaneousRewards → NO_COVERAGE |
txResponse.setInstantaneousRewards(instantaneousRewards); |
679 | } | |
680 | } | |
681 | ||
682 | /** | |
683 | * Get transaction mints info | |
684 | * | |
685 | * @param tx transaction | |
686 | * @param txResponse response data of transaction | |
687 | */ | |
688 | private void getMints(Tx tx, TxResponse txResponse) { | |
689 | List<MintProjection> maTxMints = maTxMintRepository.findByTxId(tx.getId()); | |
690 |
1
1. getMints : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(maTxMints)) { |
691 |
1
1. getMints : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setMints → NO_COVERAGE |
txResponse.setMints( |
692 | maTxMints.stream() | |
693 | .map(maTxMintMapper::fromMintProjectionToTxMintingResponse) | |
694 | .collect(Collectors.toList())); | |
695 | } | |
696 | } | |
697 | ||
698 | /** | |
699 | * Get transaction delegations info | |
700 | * | |
701 | * @param tx transaction | |
702 | * @param txResponse response data of transaction | |
703 | */ | |
704 | private void getDelegations(Tx tx, TxResponse txResponse) { | |
705 | List<Delegation> delegations = delegationRepository.findByTx(tx); | |
706 |
1
1. getDelegations : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(delegations)) { |
707 |
1
1. getDelegations : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setDelegations → NO_COVERAGE |
txResponse.setDelegations( |
708 | delegations.stream().map(delegationMapper::fromDelegation).collect(Collectors.toList())); | |
709 | } | |
710 | } | |
711 | ||
712 | /** | |
713 | * Get transaction withdrawals info | |
714 | * | |
715 | * @param tx transaction | |
716 | * @param txResponse response data of transaction | |
717 | */ | |
718 | private void getWithdrawals(Tx tx, TxResponse txResponse) { | |
719 | List<Withdrawal> withdrawals = withdrawalRepository.findByTx(tx); | |
720 |
1
1. getWithdrawals : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(withdrawals)) { |
721 | List<String> addressToList = | |
722 | txResponse.getUTxOs().getOutputs().stream() | |
723 | .map(TxOutResponse::getAddress) | |
724 | .collect(Collectors.toList()); | |
725 | List<WithdrawalResponse> withdrawalResponses = | |
726 | withdrawals.stream() | |
727 | .map( | |
728 | withdrawal -> { | |
729 | WithdrawalResponse withdrawalResponse = | |
730 | withdrawalMapper.fromWithdrawal(withdrawal); | |
731 |
1
1. lambda$getWithdrawals$23 : removed call to org/cardanofoundation/explorer/api/model/response/tx/WithdrawalResponse::setAddressTo → NO_COVERAGE |
withdrawalResponse.setAddressTo(addressToList); |
732 |
1
1. lambda$getWithdrawals$23 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getWithdrawals$23 → NO_COVERAGE |
return withdrawalResponse; |
733 | }) | |
734 | .collect(Collectors.toList()); | |
735 | ||
736 |
1
1. getWithdrawals : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setWithdrawals → NO_COVERAGE |
txResponse.setWithdrawals(withdrawalResponses); |
737 | } | |
738 | } | |
739 | ||
740 | /** | |
741 | * Get transaction collaterals info | |
742 | * | |
743 | * @param tx transaction | |
744 | * @param txResponse response data of transaction | |
745 | */ | |
746 | private void getCollaterals(Tx tx, TxResponse txResponse) { | |
747 | CollateralResponse collateralResponse = new CollateralResponse(); | |
748 | List<AddressInputOutputProjection> collateralInputs = | |
749 | unconsumeTxInRepository.findTxCollateralInput(tx); | |
750 | List<AddressInputOutputProjection> collateralOutputs = | |
751 | failedTxOutRepository.findFailedTxOutByTx(tx); | |
752 |
1
1. getCollaterals : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(collateralInputs)) { |
753 | Map<TxOutResponse, List<AddressInputOutputProjection>> addressInputMap = | |
754 | collateralInputs.stream() | |
755 | .collect(Collectors.groupingBy(txOutMapper::fromAddressInputOutput)); | |
756 | List<TxOutResponse> collateralInputResponse = mappingProjectionToAddress(addressInputMap); | |
757 |
1
1. getCollaterals : removed call to org/cardanofoundation/explorer/api/model/response/tx/CollateralResponse::setCollateralInputResponses → NO_COVERAGE |
collateralResponse.setCollateralInputResponses(collateralInputResponse); |
758 | } | |
759 |
1
1. getCollaterals : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(collateralOutputs)) { |
760 | Map<TxOutResponse, List<AddressInputOutputProjection>> addressOutputMap = | |
761 | collateralOutputs.stream() | |
762 | .collect(Collectors.groupingBy(txOutMapper::fromAddressInputOutput)); | |
763 | List<TxOutResponse> collateralOutputResponses = mappingProjectionToAddress(addressOutputMap); | |
764 |
1
1. getCollaterals : removed call to org/cardanofoundation/explorer/api/model/response/tx/CollateralResponse::setCollateralOutputResponses → NO_COVERAGE |
collateralResponse.setCollateralOutputResponses(collateralOutputResponses); |
765 | } | |
766 |
2
1. getCollaterals : negated conditional → NO_COVERAGE 2. getCollaterals : negated conditional → NO_COVERAGE |
if (CollectionUtils.isEmpty(collateralInputs) && CollectionUtils.isEmpty(collateralOutputs)) { |
767 |
1
1. getCollaterals : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setCollaterals → NO_COVERAGE |
txResponse.setCollaterals(null); |
768 | } else { | |
769 |
1
1. getCollaterals : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setCollaterals → NO_COVERAGE |
txResponse.setCollaterals(collateralResponse); |
770 | } | |
771 | } | |
772 | ||
773 | /** | |
774 | * Get transaction contracts info | |
775 | * | |
776 | * @param tx transaction | |
777 | * @param txResponse response data of transaction | |
778 | */ | |
779 | private void getContracts(Tx tx, TxResponse txResponse) { | |
780 | List<ContractResponse> contractResponses = getContractResponses(tx, txResponse); | |
781 |
1
1. getContracts : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(contractResponses)) { |
782 |
1
1. getContracts : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setContracts → NO_COVERAGE |
txResponse.setContracts(contractResponses); |
783 | } | |
784 | } | |
785 | ||
786 | private List<ContractResponse> getContractResponses(Tx tx, TxResponse txResponse) { | |
787 | List<ContractResponse> contractResponses; | |
788 | List<TxContractProjection> txContractProjections; | |
789 |
1
1. getContractResponses : negated conditional → NO_COVERAGE |
if (Boolean.TRUE.equals(tx.getValidContract())) { |
790 | contractResponses = | |
791 | redeemerRepository.findContractByTx(tx).stream() | |
792 | .map(txContractMapper::fromTxContractProjectionToContractResponse) | |
793 | .toList(); | |
794 | txContractProjections = txOutRepository.getContractDatumOutByTx(tx); | |
795 | } else { | |
796 | contractResponses = | |
797 | redeemerRepository.findContractByTxFail(tx).stream() | |
798 | .map(txContractMapper::fromTxContractProjectionToContractResponse) | |
799 | .toList(); | |
800 | txContractProjections = txOutRepository.getContractDatumOutByTxFail(tx); | |
801 | } | |
802 | ||
803 | Map<String, TxContractProjection> txContractMap = | |
804 | txContractProjections.stream() | |
805 | .collect( | |
806 | Collectors.groupingBy( | |
807 | TxContractProjection::getAddress, | |
808 |
1
1. lambda$getContractResponses$24 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getContractResponses$24 → NO_COVERAGE |
Collectors.collectingAndThen(Collectors.toList(), list -> list.get(0)))); |
809 | ||
810 | List<ReferenceInputProjection> referenceInputProjections = | |
811 | referenceTxInRepository.getReferenceInputByTx(tx); | |
812 | List<TxReferenceInput> txReferenceInputsWithSmartContract = new ArrayList<>(); | |
813 | List<TxReferenceInput> txReferenceInputsWithoutSmartContract = new ArrayList<>(); | |
814 |
1
1. getContractResponses : removed call to java/util/List::forEach → NO_COVERAGE |
referenceInputProjections.forEach( |
815 | projection -> { | |
816 |
1
1. lambda$getContractResponses$25 : negated conditional → NO_COVERAGE |
if (Objects.nonNull(projection.getScriptHash())) { |
817 | txReferenceInputsWithSmartContract.add( | |
818 | txReferenceInputMapper.fromReferenceInputProjectionTxReferenceInput(projection)); | |
819 | } else { | |
820 | txReferenceInputsWithoutSmartContract.add( | |
821 | txReferenceInputMapper.fromReferenceInputProjectionTxReferenceInput(projection)); | |
822 | } | |
823 | }); | |
824 | ||
825 | Map<String, List<TxReferenceInput>> txReferenceInputSmartContractMap = | |
826 | txReferenceInputsWithSmartContract.stream() | |
827 | .collect(Collectors.groupingBy(TxReferenceInput::getScriptHash)); | |
828 | ||
829 | contractResponses.parallelStream() | |
830 |
1
1. getContractResponses : removed call to java/util/stream/Stream::forEach → NO_COVERAGE |
.forEach( |
831 | contractResponse -> { | |
832 | TxContractProjection txContractProjection = | |
833 | txContractMap.get(contractResponse.getAddress()); | |
834 |
1
1. lambda$getContractResponses$26 : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::setContractReferenceInput → NO_COVERAGE |
setContractReferenceInput( |
835 | contractResponse, | |
836 | txReferenceInputSmartContractMap, | |
837 | txReferenceInputsWithoutSmartContract); | |
838 | ||
839 |
1
1. lambda$getContractResponses$26 : negated conditional → NO_COVERAGE |
if (txContractProjection != null) { |
840 |
1
1. lambda$getContractResponses$26 : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setDatumBytesOut → NO_COVERAGE |
contractResponse.setDatumBytesOut( |
841 | txContractMapper.bytesToString(txContractProjection.getDatumBytesOut())); | |
842 |
1
1. lambda$getContractResponses$26 : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setDatumHashOut → NO_COVERAGE |
contractResponse.setDatumHashOut(txContractProjection.getDatumHashOut()); |
843 | } | |
844 | ||
845 | switch (contractResponse.getPurpose()) { | |
846 |
1
1. lambda$getContractResponses$26 : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::setMintContractResponse → NO_COVERAGE |
case MINT -> setMintContractResponse(tx, contractResponse, txResponse); |
847 |
1
1. lambda$getContractResponses$26 : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::setSpendContractResponse → NO_COVERAGE |
case SPEND -> setSpendContractResponse(contractResponse); |
848 |
1
1. lambda$getContractResponses$26 : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::setRewardContractResponse → NO_COVERAGE |
case REWARD -> setRewardContractResponse(txResponse, contractResponse); |
849 |
1
1. lambda$getContractResponses$26 : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::setCertContractResponse → NO_COVERAGE |
case CERT -> setCertContractResponse(contractResponse); |
850 |
1
1. lambda$getContractResponses$26 : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::setVoteContractResponse → NO_COVERAGE |
case VOTING -> setVoteContractResponse(contractResponse); |
851 |
1
1. lambda$getContractResponses$26 : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::setProposeContractResponse → NO_COVERAGE |
case PROPOSING -> setProposeContractResponse(contractResponse); |
852 | } | |
853 | }); | |
854 |
1
1. getContractResponses : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getContractResponses → NO_COVERAGE |
return contractResponses; |
855 | } | |
856 | ||
857 | private void setVoteContractResponse(ContractResponse contractResponse) { | |
858 | // TODO | |
859 | } | |
860 | ||
861 | private void setProposeContractResponse(ContractResponse contractResponse) { | |
862 | // TODO | |
863 | } | |
864 | ||
865 | /** | |
866 | * Set cert contract response: | |
867 | * | |
868 | * @param contractResponse | |
869 | */ | |
870 | private void setCertContractResponse(ContractResponse contractResponse) { | |
871 |
1
1. setCertContractResponse : negated conditional → NO_COVERAGE |
if (contractResponse.getStakeAddress() != null) { |
872 |
1
1. setCertContractResponse : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setExecutionInputs → NO_COVERAGE |
contractResponse.setExecutionInputs(List.of(contractResponse.getStakeAddress())); |
873 |
1
1. setCertContractResponse : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setExecutionOutputs → NO_COVERAGE |
contractResponse.setExecutionOutputs(List.of(contractResponse.getStakeAddress())); |
874 | } | |
875 | } | |
876 | ||
877 | /** | |
878 | * Set reward contract response | |
879 | * | |
880 | * @param txResponse | |
881 | * @param contractResponse | |
882 | */ | |
883 | private void setRewardContractResponse(TxResponse txResponse, ContractResponse contractResponse) { | |
884 |
1
1. setRewardContractResponse : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setExecutionInputs → NO_COVERAGE |
contractResponse.setExecutionInputs(List.of(contractResponse.getStakeAddress())); |
885 |
1
1. setRewardContractResponse : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setExecutionOutputs → NO_COVERAGE |
contractResponse.setExecutionOutputs( |
886 | txResponse.getUTxOs().getOutputs().stream().map(TxOutResponse::getAddress).toList()); | |
887 | } | |
888 | ||
889 | /** | |
890 | * Set spend contract response | |
891 | * | |
892 | * @param contractResponse | |
893 | */ | |
894 | private void setSpendContractResponse(ContractResponse contractResponse) { | |
895 |
1
1. setSpendContractResponse : negated conditional → NO_COVERAGE |
if (contractResponse.getAddress() != null) { |
896 |
1
1. setSpendContractResponse : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setExecutionInputs → NO_COVERAGE |
contractResponse.setExecutionInputs(List.of(contractResponse.getAddress())); |
897 | } | |
898 | } | |
899 | ||
900 | /** | |
901 | * Set contract reference input | |
902 | * | |
903 | * @param contractResponse | |
904 | * @param txReferenceInputSmartContractMap | |
905 | * @param txReferenceInputsWithoutSmartContract | |
906 | */ | |
907 | private void setContractReferenceInput( | |
908 | ContractResponse contractResponse, | |
909 | Map<String, List<TxReferenceInput>> txReferenceInputSmartContractMap, | |
910 | List<TxReferenceInput> txReferenceInputsWithoutSmartContract) { | |
911 |
1
1. setContractReferenceInput : negated conditional → NO_COVERAGE |
if (txReferenceInputSmartContractMap.containsKey(contractResponse.getScriptHash())) { |
912 | List<TxReferenceInput> txReferenceInputs = | |
913 | new ArrayList<>(txReferenceInputSmartContractMap.get(contractResponse.getScriptHash())); | |
914 | txReferenceInputs.addAll(txReferenceInputsWithoutSmartContract); | |
915 |
1
1. setContractReferenceInput : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setReferenceInputs → NO_COVERAGE |
contractResponse.setReferenceInputs(txReferenceInputs); |
916 | } else { | |
917 |
1
1. setContractReferenceInput : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setReferenceInputs → NO_COVERAGE |
contractResponse.setReferenceInputs(txReferenceInputsWithoutSmartContract); |
918 | } | |
919 | } | |
920 | ||
921 | /** | |
922 | * Set mint contract response | |
923 | * | |
924 | * @param tx | |
925 | * @param contractResponse | |
926 | */ | |
927 | private void setMintContractResponse( | |
928 | Tx tx, ContractResponse contractResponse, TxResponse txResponse) { | |
929 | List<TokenAddressResponse> addressTokenProjections = | |
930 | multiAssetRepository.getMintingAssets(tx, contractResponse.getScriptHash()).stream() | |
931 | .map(tokenMapper::fromAddressTokenProjection) | |
932 | .toList(); | |
933 | ||
934 | // set metadata for tokens | |
935 | Set<String> subjects = | |
936 | addressTokenProjections.stream() | |
937 | .map( | |
938 | tokenAddressResponse -> | |
939 |
1
1. lambda$setMintContractResponse$27 : replaced return value with "" for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$setMintContractResponse$27 → NO_COVERAGE |
contractResponse.getScriptHash() + tokenAddressResponse.getName()) |
940 | .collect(Collectors.toSet()); | |
941 | Map<String, AssetMetadata> assetMetadataMap = | |
942 | assetMetadataRepository.findBySubjectIn(subjects).stream() | |
943 | .collect(Collectors.toMap(AssetMetadata::getSubject, Function.identity())); | |
944 |
1
1. setMintContractResponse : removed call to java/util/List::forEach → NO_COVERAGE |
addressTokenProjections.forEach( |
945 | tokenAddressResponse -> | |
946 |
1
1. lambda$setMintContractResponse$28 : removed call to org/cardanofoundation/explorer/api/model/response/token/TokenAddressResponse::setMetadata → NO_COVERAGE |
tokenAddressResponse.setMetadata( |
947 | assetMetadataMapper.fromAssetMetadata( | |
948 | assetMetadataMap.get( | |
949 | contractResponse.getScriptHash() + tokenAddressResponse.getName())))); | |
950 | ||
951 | // set mint or burn tokens for contract response | |
952 |
1
1. setMintContractResponse : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setMintingTokens → NO_COVERAGE |
contractResponse.setMintingTokens( |
953 | addressTokenProjections.stream() | |
954 |
3
1. lambda$setMintContractResponse$29 : negated conditional → NO_COVERAGE 2. lambda$setMintContractResponse$29 : changed conditional boundary → NO_COVERAGE 3. lambda$setMintContractResponse$29 : replaced boolean return with true for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$setMintContractResponse$29 → NO_COVERAGE |
.filter(tokenAddressResponse -> tokenAddressResponse.getQuantity().longValue() >= 0) |
955 | .toList()); | |
956 |
1
1. setMintContractResponse : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setBurningTokens → NO_COVERAGE |
contractResponse.setBurningTokens( |
957 | addressTokenProjections.stream() | |
958 |
3
1. lambda$setMintContractResponse$30 : changed conditional boundary → NO_COVERAGE 2. lambda$setMintContractResponse$30 : negated conditional → NO_COVERAGE 3. lambda$setMintContractResponse$30 : replaced boolean return with true for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$setMintContractResponse$30 → NO_COVERAGE |
.filter(tokenAddressResponse -> tokenAddressResponse.getQuantity().longValue() < 0) |
959 | .toList()); | |
960 | ||
961 | List<String> tokenMintedByContract = | |
962 | addressTokenProjections.stream().map(TokenAddressResponse::getFingerprint).toList(); | |
963 | ||
964 | List<String> executionOutputs = | |
965 | Stream.concat( | |
966 | txResponse.getUTxOs().getInputs().stream(), | |
967 | txResponse.getUTxOs().getOutputs().stream()) | |
968 | .filter( | |
969 | txOutResponse -> | |
970 |
2
1. lambda$setMintContractResponse$31 : replaced boolean return with true for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$setMintContractResponse$31 → NO_COVERAGE 2. lambda$setMintContractResponse$31 : negated conditional → NO_COVERAGE |
!Collections.disjoint( |
971 | tokenMintedByContract, | |
972 | txOutResponse.getTokens().stream() | |
973 | .map(TxMintingResponse::getAssetId) | |
974 | .toList())) | |
975 | .map(TxOutResponse::getAddress) | |
976 | .toList(); | |
977 | ||
978 |
1
1. setMintContractResponse : removed call to org/cardanofoundation/explorer/api/model/response/tx/ContractResponse::setExecutionOutputs → NO_COVERAGE |
contractResponse.setExecutionOutputs(executionOutputs); |
979 | } | |
980 | ||
981 | /** | |
982 | * Get transaction summary and UTxOs info | |
983 | * | |
984 | * @param tx transaction | |
985 | * @param txResponse response data of transaction | |
986 | */ | |
987 | private void getSummaryAndUTxOs(Tx tx, TxResponse txResponse) { | |
988 | List<AddressInputOutputProjection> addressInputInfo = txOutRepository.getTxAddressInputInfo(tx); | |
989 | Map<TxOutResponse, List<AddressInputOutputProjection>> addressInputMap = | |
990 | addressInputInfo.stream() | |
991 | .collect( | |
992 | Collectors.groupingBy( | |
993 | txOutMapper::fromAddressInputOutput, LinkedHashMap::new, Collectors.toList())); | |
994 | List<AddressInputOutputProjection> addressOutputInfo = | |
995 | txOutRepository.getTxAddressOutputInfo(tx); | |
996 | Map<TxOutResponse, List<AddressInputOutputProjection>> addressOutputMap = | |
997 | addressOutputInfo.stream() | |
998 | .collect( | |
999 | Collectors.groupingBy( | |
1000 | txOutMapper::fromAddressInputOutput, LinkedHashMap::new, Collectors.toList())); | |
1001 | ||
1002 | // Get metadata | |
1003 | List<Long> multiAssetIdList = new ArrayList<>(); | |
1004 | multiAssetIdList.addAll( | |
1005 | addressInputInfo.stream() | |
1006 | .map(AddressInputOutputProjection::getMultiAssetId) | |
1007 | .collect(Collectors.toSet())); | |
1008 | multiAssetIdList.addAll( | |
1009 | addressOutputInfo.stream() | |
1010 | .map(AddressInputOutputProjection::getMultiAssetId) | |
1011 | .collect(Collectors.toSet())); | |
1012 | ||
1013 | Pair<Map<String, AssetMetadata>, Map<Long, MultiAsset>> getMapMetadataAndMapAsset = | |
1014 | getMapMetadataAndMapAsset(multiAssetIdList); | |
1015 | ||
1016 | // uTxO | |
1017 | List<TxOutResponse> uTxOOutputs = | |
1018 | mappingProjectionToAddressWithMetadata( | |
1019 | addressOutputMap, | |
1020 | getMapMetadataAndMapAsset.getFirst(), | |
1021 | getMapMetadataAndMapAsset.getSecond()); | |
1022 | List<TxOutResponse> uTxOInputs = | |
1023 | mappingProjectionToAddressWithMetadata( | |
1024 | addressInputMap, | |
1025 | getMapMetadataAndMapAsset.getFirst(), | |
1026 | getMapMetadataAndMapAsset.getSecond()); | |
1027 | ||
1028 | UTxOResponse uTxOs = UTxOResponse.builder().inputs(uTxOInputs).outputs(uTxOOutputs).build(); | |
1029 |
1
1. getSummaryAndUTxOs : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setUTxOs → NO_COVERAGE |
txResponse.setUTxOs(uTxOs); |
1030 | ||
1031 | // Summary | |
1032 | List<TxOutResponse> addressesInfoInput = getStakeAddressInfo(addressInputInfo); | |
1033 | List<TxOutResponse> addressesInfoOutput = getStakeAddressInfo(addressOutputInfo); | |
1034 | ||
1035 | List<TxOutResponse> stakeAddress = | |
1036 | removeDuplicateTx( | |
1037 | addressesInfoInput, | |
1038 | addressesInfoOutput, | |
1039 | getMapMetadataAndMapAsset.getFirst(), | |
1040 | getMapMetadataAndMapAsset.getSecond()); | |
1041 | ||
1042 | SummaryResponse summary = SummaryResponse.builder().stakeAddress(stakeAddress).build(); | |
1043 | ||
1044 |
1
1. getSummaryAndUTxOs : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setSummary → NO_COVERAGE |
txResponse.setSummary(summary); |
1045 | } | |
1046 | ||
1047 | private List<TxOutResponse> removeDuplicateTx( | |
1048 | List<TxOutResponse> addressesInputs, | |
1049 | List<TxOutResponse> addressesOutputs, | |
1050 | Map<String, AssetMetadata> assetMetadataMap, | |
1051 | Map<Long, MultiAsset> multiAssetMap) { | |
1052 | ||
1053 |
1
1. removeDuplicateTx : removed call to java/util/List::forEach → NO_COVERAGE |
addressesInputs.forEach( |
1054 | txOutResponse -> { | |
1055 |
1
1. lambda$removeDuplicateTx$33 : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxOutResponse::setValue → NO_COVERAGE |
txOutResponse.setValue(txOutResponse.getValue().multiply(BigInteger.valueOf(-1))); |
1056 | txOutResponse | |
1057 | .getTokens() | |
1058 |
1
1. lambda$removeDuplicateTx$33 : removed call to java/util/List::forEach → NO_COVERAGE |
.forEach( |
1059 | token -> | |
1060 |
1
1. lambda$removeDuplicateTx$32 : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxMintingResponse::setAssetQuantity → NO_COVERAGE |
token.setAssetQuantity( |
1061 | token.getAssetQuantity().multiply(BigInteger.valueOf(-1)))); | |
1062 | }); | |
1063 | ||
1064 | Map<String, List<TxOutResponse>> unionTxsByAddress = | |
1065 | Stream.concat(addressesInputs.stream(), addressesOutputs.stream()) | |
1066 | .collect( | |
1067 | Collectors.groupingBy( | |
1068 | TxOutResponse::getAddress, Collectors.toCollection(ArrayList::new))); | |
1069 | ||
1070 | List<TxOutResponse> summary = new ArrayList<>(); | |
1071 | ||
1072 |
1
1. removeDuplicateTx : removed call to java/util/Map::forEach → NO_COVERAGE |
unionTxsByAddress.forEach( |
1073 | (address, txs) -> { | |
1074 | TxOutResponse txOutResponse = new TxOutResponse(); | |
1075 | BigInteger totalValue = | |
1076 | txs.stream().map(TxOutResponse::getValue).reduce(BigInteger.ZERO, BigInteger::add); | |
1077 | Map<String, List<TxMintingResponse>> unionTokenByAsset = | |
1078 | txs.stream() | |
1079 | .map(TxOutResponse::getTokens) | |
1080 | .flatMap(List::stream) | |
1081 | .collect( | |
1082 | Collectors.groupingBy( | |
1083 | TxMintingResponse::getAssetId, Collectors.toCollection(ArrayList::new))); | |
1084 | ||
1085 | List<TxMintingResponse> tokenResponse = new ArrayList<>(); | |
1086 | ||
1087 |
1
1. lambda$removeDuplicateTx$35 : removed call to java/util/Map::forEach → NO_COVERAGE |
unionTokenByAsset.forEach( |
1088 | (asset, tokens) -> { | |
1089 | BigInteger totalQuantity = | |
1090 | tokens.stream() | |
1091 | .map(TxMintingResponse::getAssetQuantity) | |
1092 | .reduce(BigInteger.ZERO, BigInteger::add); | |
1093 | ||
1094 |
1
1. lambda$removeDuplicateTx$34 : negated conditional → NO_COVERAGE |
if (!BigInteger.ZERO.equals(totalQuantity)) { |
1095 | TxMintingResponse token = tokens.get(0); | |
1096 |
1
1. lambda$removeDuplicateTx$34 : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::setMetadata → NO_COVERAGE |
setMetadata(assetMetadataMap, multiAssetMap, token); |
1097 |
1
1. lambda$removeDuplicateTx$34 : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxMintingResponse::setAssetQuantity → NO_COVERAGE |
token.setAssetQuantity(totalQuantity); |
1098 | tokenResponse.add(token); | |
1099 | } | |
1100 | }); | |
1101 |
1
1. lambda$removeDuplicateTx$35 : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxOutResponse::setAddress → NO_COVERAGE |
txOutResponse.setAddress(address); |
1102 |
1
1. lambda$removeDuplicateTx$35 : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxOutResponse::setTokens → NO_COVERAGE |
txOutResponse.setTokens(tokenResponse); |
1103 |
1
1. lambda$removeDuplicateTx$35 : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxOutResponse::setValue → NO_COVERAGE |
txOutResponse.setValue(totalValue); |
1104 | summary.add(txOutResponse); | |
1105 | }); | |
1106 | ||
1107 |
1
1. removeDuplicateTx : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::removeDuplicateTx → NO_COVERAGE |
return summary.stream() |
1108 | .sorted(Comparator.comparing(TxOutResponse::getValue)) | |
1109 | .collect(Collectors.toList()); | |
1110 | } | |
1111 | ||
1112 | private void setMetadata( | |
1113 | Map<String, AssetMetadata> assetMetadataMap, | |
1114 | Map<Long, MultiAsset> multiAssetMap, | |
1115 | TxMintingResponse token) { | |
1116 | MultiAsset multiAsset = multiAssetMap.get(token.getMultiAssetId()); | |
1117 |
1
1. setMetadata : negated conditional → NO_COVERAGE |
if (!Objects.isNull(multiAsset)) { |
1118 | String subject = multiAsset.getPolicy() + multiAsset.getName(); | |
1119 | AssetMetadata metadata = assetMetadataMap.get(subject); | |
1120 |
1
1. setMetadata : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxMintingResponse::setMetadata → NO_COVERAGE |
token.setMetadata(assetMetadataMapper.fromAssetMetadata(metadata)); |
1121 | } | |
1122 | } | |
1123 | ||
1124 | /** | |
1125 | * Get transaction stake certificates info | |
1126 | * | |
1127 | * @param tx transaction | |
1128 | * @param txResponse response data of stake certificates | |
1129 | */ | |
1130 | private void getStakeCertificates(Tx tx, TxResponse txResponse) { | |
1131 | List<TxStakeCertificate> stakeCertificates = | |
1132 | stakeRegistrationRepository.findByTx(tx).stream() | |
1133 | .map( | |
1134 | item -> | |
1135 |
1
1. lambda$getStakeCertificates$36 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getStakeCertificates$36 → NO_COVERAGE |
new TxStakeCertificate( |
1136 | item.getAddr().getView(), CertificateType.STAKE_REGISTRATION)) | |
1137 | .collect(Collectors.toList()); | |
1138 | stakeCertificates.addAll( | |
1139 | stakeDeRegistrationRepository.findByTx(tx).stream() | |
1140 | .map( | |
1141 | item -> | |
1142 |
1
1. lambda$getStakeCertificates$37 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getStakeCertificates$37 → NO_COVERAGE |
new TxStakeCertificate( |
1143 | item.getAddr().getView(), CertificateType.STAKE_DEREGISTRATION)) | |
1144 | .collect(Collectors.toList())); | |
1145 |
1
1. getStakeCertificates : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(stakeCertificates)) { |
1146 |
1
1. getStakeCertificates : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setStakeCertificates → NO_COVERAGE |
txResponse.setStakeCertificates(stakeCertificates); |
1147 | } | |
1148 | } | |
1149 | ||
1150 | /** | |
1151 | * Get transaction pool certificates info | |
1152 | * | |
1153 | * @param tx transaction | |
1154 | * @param txResponse response data of pool certificates | |
1155 | */ | |
1156 | private void getPoolCertificates(Tx tx, TxResponse txResponse) { | |
1157 | ||
1158 | // get pool registration | |
1159 | List<PoolUpdateDetailProjection> poolUpdateDetailProjections = | |
1160 | poolUpdateRepository.findByTx(tx); | |
1161 | Set<Long> poolUpdateIdSet = | |
1162 | poolUpdateDetailProjections.stream() | |
1163 | .map(PoolUpdateDetailProjection::getPoolUpdateId) | |
1164 | .collect(Collectors.toSet()); | |
1165 | List<StakeKeyProjection> poolOwners = | |
1166 | poolUpdateRepository.findOwnerAccountByPoolUpdate(poolUpdateIdSet); | |
1167 | Map<Long, List<String>> poolOwnerMap = | |
1168 | poolOwners.stream() | |
1169 | .collect( | |
1170 | Collectors.groupingBy( | |
1171 | StakeKeyProjection::getPoolUpdateId, | |
1172 | Collectors.mapping(StakeKeyProjection::getView, Collectors.toList()))); | |
1173 | List<PoolRelayProjection> poolRelays = poolRelayRepository.findByPoolHashIdIn(poolUpdateIdSet); | |
1174 | Map<Long, List<PoolRelayProjection>> poolRelayMap = | |
1175 | poolRelays.stream().collect(Collectors.groupingBy(PoolRelayProjection::getPoolUpdateId)); | |
1176 | List<TxPoolCertificate> poolCertificates = | |
1177 | poolUpdateDetailProjections.stream() | |
1178 | .map( | |
1179 | item -> { | |
1180 | List<PoolRelayResponse> relays = null; | |
1181 |
1
1. lambda$getPoolCertificates$39 : negated conditional → NO_COVERAGE |
if (poolRelayMap.containsKey(item.getPoolUpdateId())) { |
1182 | relays = | |
1183 | poolRelayMap.get(item.getPoolUpdateId()).stream() | |
1184 | .map( | |
1185 | relay -> | |
1186 |
1
1. lambda$getPoolCertificates$38 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getPoolCertificates$38 → NO_COVERAGE |
PoolRelayResponse.builder() |
1187 | .dnsName(relay.getDnsName()) | |
1188 | .dnsSrvName(relay.getDnsSrvName()) | |
1189 | .ipv4(relay.getIpv4()) | |
1190 | .ipv6(relay.getIpv6()) | |
1191 | .port(relay.getPort()) | |
1192 | .build()) | |
1193 | .collect(Collectors.toList()); | |
1194 | } | |
1195 | List<String> poolOwnersList = new ArrayList<>(); | |
1196 |
1
1. lambda$getPoolCertificates$39 : negated conditional → NO_COVERAGE |
if (poolOwnerMap.containsKey(item.getPoolUpdateId())) { |
1197 | poolOwnersList = poolOwnerMap.get(item.getPoolUpdateId()); | |
1198 | } | |
1199 |
1
1. lambda$getPoolCertificates$39 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getPoolCertificates$39 → NO_COVERAGE |
return TxPoolCertificate.builder() |
1200 | .poolId(item.getPoolView()) | |
1201 | .margin(item.getMargin()) | |
1202 | .rewardAccount(item.getRewardAccount()) | |
1203 | .pledge(item.getPledge()) | |
1204 | .vrfKey(item.getVrfKey()) | |
1205 | .cost(item.getCost()) | |
1206 | .metadataHash(item.getMetadataHash()) | |
1207 | .metadataUrl(item.getMetadataUrl()) | |
1208 | .poolOwners(poolOwnersList) | |
1209 | .relays(relays) | |
1210 | .type(CertificateType.POOL_REGISTRATION) | |
1211 | .build(); | |
1212 | }) | |
1213 | .collect(Collectors.toList()); | |
1214 | ||
1215 | // get pool de registration | |
1216 | List<PoolDeRegistrationProjection> poolRetireDetailProjections = | |
1217 | poolRetireRepository.findByAnnouncedTx(tx); | |
1218 | poolCertificates.addAll( | |
1219 | poolRetireDetailProjections.stream() | |
1220 | .map( | |
1221 | item -> | |
1222 |
1
1. lambda$getPoolCertificates$40 : replaced return value with null for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getPoolCertificates$40 → NO_COVERAGE |
TxPoolCertificate.builder() |
1223 | .poolId(item.getPoolId()) | |
1224 | .epoch(item.getRetiringEpoch()) | |
1225 | .type(CertificateType.POOL_DEREGISTRATION) | |
1226 | .build()) | |
1227 | .collect(Collectors.toList())); | |
1228 |
1
1. getPoolCertificates : negated conditional → NO_COVERAGE |
if (!CollectionUtils.isEmpty(poolCertificates)) { |
1229 |
1
1. getPoolCertificates : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setPoolCertificates → NO_COVERAGE |
txResponse.setPoolCertificates(poolCertificates); |
1230 | } | |
1231 | } | |
1232 | ||
1233 | /** | |
1234 | * Map data from AddressInputOutputProjection to TxOutResponse | |
1235 | * | |
1236 | * @param addressInputOutputMap address with metadata projection map | |
1237 | * @return address response | |
1238 | */ | |
1239 | private List<TxOutResponse> mappingProjectionToAddressWithMetadata( | |
1240 | Map<TxOutResponse, List<AddressInputOutputProjection>> addressInputOutputMap, | |
1241 | Map<String, AssetMetadata> assetMetadataMap, | |
1242 | Map<Long, MultiAsset> multiAssetMap) { | |
1243 | List<TxOutResponse> uTxOs = new ArrayList<>(addressInputOutputMap.keySet()); | |
1244 | for (TxOutResponse uTxO : uTxOs) { | |
1245 | List<TxMintingResponse> tokens = | |
1246 | addressInputOutputMap.get(uTxO).stream() | |
1247 |
2
1. lambda$mappingProjectionToAddressWithMetadata$41 : replaced boolean return with false for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$mappingProjectionToAddressWithMetadata$41 → NO_COVERAGE 2. lambda$mappingProjectionToAddressWithMetadata$41 : replaced boolean return with true for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$mappingProjectionToAddressWithMetadata$41 → NO_COVERAGE |
.filter(token -> Objects.nonNull(token.getAssetId())) |
1248 | .map(maTxMintMapper::fromAddressInputOutputProjection) | |
1249 | .collect(Collectors.toList()); | |
1250 | tokens.addAll(getTokenInFailedTxOut(addressInputOutputMap, uTxO)); | |
1251 |
2
1. mappingProjectionToAddressWithMetadata : removed call to java/util/List::forEach → NO_COVERAGE 2. lambda$mappingProjectionToAddressWithMetadata$42 : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::setMetadata → NO_COVERAGE |
tokens.forEach(token -> setMetadata(assetMetadataMap, multiAssetMap, token)); |
1252 |
1
1. mappingProjectionToAddressWithMetadata : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxOutResponse::setTokens → NO_COVERAGE |
uTxO.setTokens(tokens); |
1253 | } | |
1254 |
1
1. mappingProjectionToAddressWithMetadata : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::mappingProjectionToAddressWithMetadata → NO_COVERAGE |
return uTxOs; |
1255 | } | |
1256 | ||
1257 | /** | |
1258 | * Map data from AddressInputOutputProjection to TxOutResponse | |
1259 | * | |
1260 | * @param addressInputOutputMap address projection map | |
1261 | * @return address response | |
1262 | */ | |
1263 | private List<TxOutResponse> mappingProjectionToAddress( | |
1264 | Map<TxOutResponse, List<AddressInputOutputProjection>> addressInputOutputMap) { | |
1265 | List<TxOutResponse> uTxOs = new ArrayList<>(addressInputOutputMap.keySet()); | |
1266 | for (TxOutResponse uTxO : uTxOs) { | |
1267 | List<TxMintingResponse> tokens = | |
1268 | addressInputOutputMap.get(uTxO).stream() | |
1269 |
2
1. lambda$mappingProjectionToAddress$43 : replaced boolean return with true for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$mappingProjectionToAddress$43 → NO_COVERAGE 2. lambda$mappingProjectionToAddress$43 : replaced boolean return with false for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$mappingProjectionToAddress$43 → NO_COVERAGE |
.filter(token -> Objects.nonNull(token.getAssetId())) |
1270 | .map(maTxMintMapper::fromAddressInputOutputProjection) | |
1271 | .collect(Collectors.toList()); | |
1272 | tokens.addAll(getTokenInFailedTxOut(addressInputOutputMap, uTxO)); | |
1273 |
1
1. mappingProjectionToAddress : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxOutResponse::setTokens → NO_COVERAGE |
uTxO.setTokens(tokens); |
1274 | } | |
1275 |
1
1. mappingProjectionToAddress : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::mappingProjectionToAddress → NO_COVERAGE |
return uTxOs; |
1276 | } | |
1277 | ||
1278 | /** | |
1279 | * If data from collateral output, handle token in json string data Otherwise, not exist json | |
1280 | * string data Example of json string data: | |
1281 | * [{"unit":"LOVELACE","policyId":"","assetName":"TE9WRUxBQ0U=","quantity":2726335}] | |
1282 | * | |
1283 | * @param addressInputOutputMap address projection map | |
1284 | * @param txOut list collateral output | |
1285 | */ | |
1286 | private List<TxMintingResponse> getTokenInFailedTxOut( | |
1287 | Map<TxOutResponse, List<AddressInputOutputProjection>> addressInputOutputMap, | |
1288 | TxOutResponse txOut) { | |
1289 | List<TxMintingResponse> tokens = new ArrayList<>(); | |
1290 | List<String> tokenStringList = | |
1291 | addressInputOutputMap.get(txOut).stream() | |
1292 | .map(AddressInputOutputProjection::getAssetsJson) | |
1293 | .filter(StringUtils::isNotEmpty) | |
1294 | .toList(); | |
1295 | ObjectMapper objectMapper = new ObjectMapper(); | |
1296 |
1
1. getTokenInFailedTxOut : removed call to java/util/List::forEach → NO_COVERAGE |
tokenStringList.forEach( |
1297 | tokenString -> { | |
1298 |
1
1. lambda$getTokenInFailedTxOut$44 : negated conditional → NO_COVERAGE |
if (StringUtils.isNotEmpty(tokenString)) { |
1299 | try { | |
1300 | JsonNode tokenFailedTxOut = objectMapper.readValue(tokenString, JsonNode.class); | |
1301 | for (JsonNode token : tokenFailedTxOut) { | |
1302 | String[] policyAndName = token.get("unit").asText().split("\\."); | |
1303 |
3
1. lambda$getTokenInFailedTxOut$44 : negated conditional → NO_COVERAGE 2. lambda$getTokenInFailedTxOut$44 : changed conditional boundary → NO_COVERAGE 3. lambda$getTokenInFailedTxOut$44 : negated conditional → NO_COVERAGE |
if (CommonConstant.LOVELACE.equals(token.get("unit").asText()) |
1304 | || policyAndName.length < 2) { | |
1305 | continue; | |
1306 | } | |
1307 | String assetName = policyAndName[1]; | |
1308 | String assetDisplayName = | |
1309 | HexUtils.fromHex( | |
1310 | assetName, | |
1311 | AssetUtil.calculateFingerPrint(token.get("policyId").asText(), assetName)); | |
1312 | TxMintingResponse txMintingResponse = | |
1313 | TxMintingResponse.builder() | |
1314 | .assetId(token.get("unit").asText()) | |
1315 | .assetName(assetDisplayName) | |
1316 | .policy(token.get("policyId").asText()) | |
1317 | .assetQuantity(new BigInteger(token.get("quantity").asText())) | |
1318 | .build(); | |
1319 | tokens.add(txMintingResponse); | |
1320 | } | |
1321 | } catch (JsonProcessingException e) { | |
1322 | log.error("Failed to parse token json string: {}", tokenString); | |
1323 | } | |
1324 | } | |
1325 | }); | |
1326 |
1
1. getTokenInFailedTxOut : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTokenInFailedTxOut → NO_COVERAGE |
return tokens; |
1327 | } | |
1328 | ||
1329 | /** | |
1330 | * Get stake address info from address | |
1331 | * | |
1332 | * @param addressInfo List address input or output info | |
1333 | * @return list stake address input or output info | |
1334 | */ | |
1335 | private List<TxOutResponse> getStakeAddressInfo(List<AddressInputOutputProjection> addressInfo) { | |
1336 | ||
1337 | Map<TxOutResponse, List<AddressInputOutputProjection>> addressMap = | |
1338 | addressInfo.stream() | |
1339 | .collect(Collectors.groupingBy(txOutMapper::fromStakeAddressInputOutput)); | |
1340 | Map<String, List<AddressInputOutputProjection>> addressTokenMap = | |
1341 | addressInfo.stream() | |
1342 | .collect(Collectors.groupingBy(AddressInputOutputProjection::getStakeAddress)); | |
1343 | var addressValueMap = | |
1344 | addressMap.keySet().stream() | |
1345 | .collect( | |
1346 | Collectors.groupingBy( | |
1347 | TxOutResponse::getAddress, | |
1348 | Collectors.reducing( | |
1349 | BigInteger.ZERO, TxOutResponse::getValue, BigInteger::add))); | |
1350 | List<TxOutResponse> stakeAddressTxInputList = new ArrayList<>(); | |
1351 |
1
1. getStakeAddressInfo : removed call to java/util/Map::forEach → NO_COVERAGE |
addressValueMap.forEach( |
1352 | (key, value) -> | |
1353 | stakeAddressTxInputList.add( | |
1354 | TxOutResponse.builder() | |
1355 | .address(key) | |
1356 | .value(value) | |
1357 | .tokens( | |
1358 | addressTokenMap.get(key).stream() | |
1359 |
2
1. lambda$getStakeAddressInfo$45 : replaced boolean return with false for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getStakeAddressInfo$45 → NO_COVERAGE 2. lambda$getStakeAddressInfo$45 : replaced boolean return with true for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::lambda$getStakeAddressInfo$45 → NO_COVERAGE |
.filter(token -> Objects.nonNull(token.getAssetId())) |
1360 | .map(maTxMintMapper::fromAddressInputOutputProjection) | |
1361 | .collect(Collectors.toList())) | |
1362 | .build())); | |
1363 |
1
1. getStakeAddressInfo : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getStakeAddressInfo → NO_COVERAGE |
return stakeAddressTxInputList; |
1364 | } | |
1365 | ||
1366 | private List<TxGraph> getTransactionChartInMonthRange(long month) { | |
1367 | LocalDateTime localDate = LocalDateTime.ofInstant(Instant.now(), ZoneOffset.UTC); | |
1368 | ||
1369 | final LocalDateTime currentLocalDate = | |
1370 | LocalDateTime.of( | |
1371 | LocalDate.of( | |
1372 | localDate.getYear(), localDate.getMonth(), LocalDateTime.MIN.getDayOfMonth()), | |
1373 | LocalTime.of(BigInteger.ZERO.intValue(), BigInteger.ZERO.intValue())); | |
1374 | ||
1375 | final LocalDateTime previousMonths = currentLocalDate.minusMonths(month); | |
1376 | final BigInteger currentMonthsInSeconds = | |
1377 | BigInteger.valueOf(currentLocalDate.toInstant(ZoneOffset.UTC).getEpochSecond()); | |
1378 | final BigInteger previousMonthsInSeconds = | |
1379 | BigInteger.valueOf(previousMonths.toInstant(ZoneOffset.UTC).getEpochSecond()); | |
1380 | ||
1381 | Long startTime = blockRepository.getMinBlockTime(); | |
1382 | // round to the first day of the month | |
1383 | startTime = | |
1384 | OffsetDateTime.ofInstant(Instant.ofEpochSecond(startTime), ZoneOffset.UTC) | |
1385 | .withDayOfMonth(1) | |
1386 | .withHour(0) | |
1387 | .withMinute(0) | |
1388 | .withSecond(0) | |
1389 | .toEpochSecond(); | |
1390 | ||
1391 | List<TxGraph> txGraphs = | |
1392 | toTxGraph( | |
1393 | txChartRepository.getTransactionGraphMonthGreaterThan(previousMonthsInSeconds), | |
1394 | Math.max(previousMonthsInSeconds.longValue(), startTime), | |
1395 | currentMonthsInSeconds.longValue(), | |
1396 | MONTH_STEP_EPOCH_SECOND); | |
1397 | ||
1398 |
1
1. getTransactionChartInMonthRange : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionChartInMonthRange → KILLED |
return txGraphs.stream().sorted(Comparator.comparing(TxGraph::getDate)).toList(); |
1399 | } | |
1400 | ||
1401 | private List<TxGraph> getTransactionChartInAllRange() { | |
1402 | Long startTime = blockRepository.getMinBlockTime(); | |
1403 | // round to the first day of the month | |
1404 | startTime = | |
1405 | OffsetDateTime.ofInstant(Instant.ofEpochSecond(startTime), ZoneOffset.UTC) | |
1406 | .withDayOfMonth(1) | |
1407 | .withHour(0) | |
1408 | .withMinute(0) | |
1409 | .withSecond(0) | |
1410 | .toEpochSecond(); | |
1411 | ||
1412 | LocalDateTime localDate = LocalDateTime.ofInstant(Instant.now(), ZoneOffset.UTC); | |
1413 | ||
1414 | final LocalDateTime currentLocalDate = | |
1415 | LocalDateTime.of( | |
1416 | LocalDate.of( | |
1417 | localDate.getYear(), localDate.getMonth(), LocalDateTime.MIN.getDayOfMonth()), | |
1418 | LocalTime.of(BigInteger.ZERO.intValue(), BigInteger.ZERO.intValue())); | |
1419 | ||
1420 | final BigInteger currentMonthsInSeconds = | |
1421 | BigInteger.valueOf(currentLocalDate.toInstant(ZoneOffset.UTC).getEpochSecond()); | |
1422 | ||
1423 | List<TxGraph> txGraphs = | |
1424 | toTxGraph( | |
1425 | txChartRepository.getTransactionGraphMonthGreaterThan(null), | |
1426 | startTime, | |
1427 | currentMonthsInSeconds.longValue(), | |
1428 | MONTH_STEP_EPOCH_SECOND); | |
1429 |
1
1. getTransactionChartInAllRange : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionChartInAllRange → KILLED |
return txGraphs.stream().sorted(Comparator.comparing(TxGraph::getDate)).toList(); |
1430 | } | |
1431 | ||
1432 | /** | |
1433 | * get transaction graph in month with day unit | |
1434 | * | |
1435 | * @param day | |
1436 | * @return | |
1437 | */ | |
1438 | private List<TxGraph> getTransactionChartInRange(long day) { | |
1439 | LocalDateTime localDate = LocalDateTime.ofInstant(Instant.now(), ZoneOffset.UTC); | |
1440 | ||
1441 | final LocalDateTime currentLocalDate = | |
1442 | LocalDateTime.of( | |
1443 | LocalDate.of(localDate.getYear(), localDate.getMonth(), localDate.getDayOfMonth()), | |
1444 | LocalTime.of(BigInteger.ZERO.intValue(), BigInteger.ZERO.intValue())); | |
1445 | ||
1446 |
1
1. getTransactionChartInRange : negated conditional → KILLED |
final LocalDateTime previousDays = currentLocalDate.minusMonths(day == DAYS_IN_MONTH ? 1 : 3); |
1447 | ||
1448 | final BigInteger currentDaysInSeconds = | |
1449 | BigInteger.valueOf(currentLocalDate.toInstant(ZoneOffset.UTC).getEpochSecond()); | |
1450 | ||
1451 | final BigInteger previousDaysInSeconds = | |
1452 | BigInteger.valueOf(previousDays.toInstant(ZoneOffset.UTC).getEpochSecond()); | |
1453 | ||
1454 | List<TxGraph> txCharts = | |
1455 | toTxGraph( | |
1456 | txChartRepository.getTransactionGraphDayGreaterThan(previousDaysInSeconds), | |
1457 | previousDaysInSeconds.longValue(), | |
1458 | currentDaysInSeconds.longValue(), | |
1459 | DAY_STEP_EPOCH_SECOND); | |
1460 | ||
1461 |
1
1. getTransactionChartInRange : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTransactionChartInRange → KILLED |
return getTxGraphsByDayRange((int) day, txCharts); |
1462 | } | |
1463 | ||
1464 | private static List<TxGraph> getTxGraphsByDayRange(int day, List<TxGraph> txCharts) { | |
1465 | ||
1466 |
2
1. getTxGraphsByDayRange : changed conditional boundary → SURVIVED 2. getTxGraphsByDayRange : negated conditional → SURVIVED |
if (txCharts.size() < day) { |
1467 |
1
1. getTxGraphsByDayRange : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTxGraphsByDayRange → NO_COVERAGE |
return txCharts.stream().sorted(Comparator.comparing(TxGraph::getDate)).toList(); |
1468 | } | |
1469 | ||
1470 |
1
1. getTxGraphsByDayRange : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getTxGraphsByDayRange → KILLED |
return txCharts.subList(BigInteger.ZERO.intValue(), day).stream() |
1471 | .sorted(Comparator.comparing(TxGraph::getDate)) | |
1472 | .toList(); | |
1473 | } | |
1474 | ||
1475 | /** | |
1476 | * Mapping projection to TxGraph | |
1477 | * | |
1478 | * @param txs | |
1479 | * @return | |
1480 | */ | |
1481 | private static List<TxGraph> toTxGraph( | |
1482 | List<TxGraphProjection> txs, | |
1483 | long epochSecondStartTime, | |
1484 | long currentEpochSecondTime, | |
1485 | long epochStep) { | |
1486 | Map<BigInteger, TxGraphProjection> txGraphMap = | |
1487 | txs.stream().collect(Collectors.toMap(TxGraphProjection::getTime, Function.identity())); | |
1488 | ||
1489 | List<TxGraph> txGraphs = new ArrayList<>(); | |
1490 |
2
1. toTxGraph : negated conditional → KILLED 2. toTxGraph : changed conditional boundary → KILLED |
while (epochSecondStartTime <= currentEpochSecondTime) { |
1491 | TxGraphProjection txChart = txGraphMap.get(BigInteger.valueOf(epochSecondStartTime)); | |
1492 | OffsetDateTime offsetDateTime = | |
1493 | OffsetDateTime.ofInstant(Instant.ofEpochSecond(epochSecondStartTime), ZoneOffset.UTC); | |
1494 | OffsetDateTime nextOffsetDateTime = | |
1495 |
1
1. toTxGraph : negated conditional → KILLED |
epochStep == MONTH_STEP_EPOCH_SECOND |
1496 | ? offsetDateTime.plusMonths(1) | |
1497 | : offsetDateTime.plusDays(1); | |
1498 | ||
1499 |
1
1. toTxGraph : negated conditional → KILLED |
if (txChart == null) { |
1500 | txGraphs.add( | |
1501 | TxGraph.builder() | |
1502 | .date( | |
1503 | Date.from( | |
1504 | OffsetDateTime.ofInstant( | |
1505 | Instant.ofEpochSecond(epochSecondStartTime), ZoneOffset.UTC) | |
1506 | .toInstant())) | |
1507 | .simpleTransactions(BigInteger.ZERO) | |
1508 | .smartContract(BigInteger.ZERO) | |
1509 | .metadata(BigInteger.ZERO) | |
1510 | .build()); | |
1511 | } else { | |
1512 | txGraphs.add( | |
1513 | TxGraph.builder() | |
1514 | .date( | |
1515 | Date.from( | |
1516 | OffsetDateTime.ofInstant( | |
1517 | Instant.ofEpochSecond(txChart.getTime().longValue()), | |
1518 | ZoneOffset.UTC) | |
1519 | .toInstant())) | |
1520 | .simpleTransactions(txChart.getSimpleTransactions()) | |
1521 | .smartContract(txChart.getSmartContract()) | |
1522 | .metadata(txChart.getMetadata()) | |
1523 | .build()); | |
1524 | } | |
1525 | ||
1526 | epochSecondStartTime = nextOffsetDateTime.toEpochSecond(); | |
1527 | } | |
1528 | ||
1529 |
1
1. toTxGraph : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::toTxGraph → KILLED |
return txGraphs; |
1530 | } | |
1531 | ||
1532 | /** | |
1533 | * Update redis index | |
1534 | * | |
1535 | * @param txGraphs | |
1536 | * @param key | |
1537 | * @param isEmpty | |
1538 | */ | |
1539 | private void updateRedisTxGraph(List<TxGraph> txGraphs, String key, boolean isEmpty) { | |
1540 | ||
1541 |
1
1. updateRedisTxGraph : negated conditional → NO_COVERAGE |
if (isEmpty) { |
1542 |
1
1. updateRedisTxGraph : removed call to java/util/List::forEach → NO_COVERAGE |
txGraphs.forEach(txGraph -> redisTemplate.opsForList().leftPush(key, txGraph)); |
1543 | } | |
1544 | } | |
1545 | ||
1546 | /** | |
1547 | * create redis key | |
1548 | * | |
1549 | * @param rawKey | |
1550 | * @return | |
1551 | */ | |
1552 | private String getRedisKey(String rawKey) { | |
1553 |
1
1. getRedisKey : replaced return value with "" for org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::getRedisKey → NO_COVERAGE |
return String.join("_", this.network, rawKey); |
1554 | } | |
1555 | ||
1556 | /** | |
1557 | * Get protocol params update in transaction | |
1558 | * | |
1559 | * @param tx transaction | |
1560 | * @param txResponse response data of transaction | |
1561 | */ | |
1562 | private void getProtocols(Tx tx, TxResponse txResponse) { | |
1563 | ||
1564 | List<ParamProposal> paramProposals = | |
1565 | paramProposalRepository.getParamProposalByRegisteredTxId(tx.getId()); | |
1566 | ||
1567 |
1
1. getProtocols : negated conditional → NO_COVERAGE |
if (!ObjectUtils.isEmpty(paramProposals)) { |
1568 | // find current change param | |
1569 |
1
1. getProtocols : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setProtocols → NO_COVERAGE |
txResponse.setProtocols(protocolMapper.mapProtocolParamResponse(paramProposals)); |
1570 | // get previous value | |
1571 |
1
1. getProtocols : negated conditional → NO_COVERAGE |
if (Objects.nonNull(txResponse.getProtocols())) { |
1572 | Integer epochNo = tx.getBlock().getEpochNo(); | |
1573 | ||
1574 | epochParamRepository | |
1575 | .findEpochParamByEpochNo(epochNo) | |
1576 |
1
1. getProtocols : removed call to java/util/Optional::ifPresent → NO_COVERAGE |
.ifPresent( |
1577 | epochParam -> | |
1578 |
1
1. lambda$getProtocols$48 : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setPreviousProtocols → NO_COVERAGE |
txResponse.setPreviousProtocols( |
1579 | protocolMapper.mapPreviousProtocolParamResponse( | |
1580 | epochParam, txResponse.getProtocols()))); | |
1581 | } | |
1582 |
1
1. getProtocols : removed call to org/cardanofoundation/explorer/api/service/impl/TxServiceImpl::processCheckIfSameProtocol → NO_COVERAGE |
processCheckIfSameProtocol(txResponse); |
1583 | } | |
1584 | } | |
1585 | ||
1586 | private void processCheckIfSameProtocol(TxResponse txResponse) { | |
1587 | ProtocolParamResponse currentProtocol = txResponse.getProtocols(); | |
1588 | ProtocolParamResponse previousProtocol = txResponse.getPreviousProtocols(); | |
1589 | ||
1590 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMinFeeA()) |
1591 | && Objects.hashCode(currentProtocol.getMinFeeA()) | |
1592 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMinFeeA())) { |
1593 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMinFeeA → NO_COVERAGE |
currentProtocol.setMinFeeA(null); |
1594 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMinFeeA → NO_COVERAGE |
previousProtocol.setMinFeeA(null); |
1595 | } | |
1596 | ||
1597 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMinFeeB()) |
1598 | && Objects.hashCode(currentProtocol.getMinFeeB()) | |
1599 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMinFeeB())) { |
1600 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMinFeeB → NO_COVERAGE |
currentProtocol.setMinFeeB(null); |
1601 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMinFeeB → NO_COVERAGE |
previousProtocol.setMinFeeB(null); |
1602 | } | |
1603 | ||
1604 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxBlockSize()) |
1605 | && Objects.hashCode(currentProtocol.getMaxBlockSize()) | |
1606 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxBlockSize())) { |
1607 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxBlockSize → NO_COVERAGE |
currentProtocol.setMaxBlockSize(null); |
1608 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxBlockSize → NO_COVERAGE |
previousProtocol.setMaxBlockSize(null); |
1609 | } | |
1610 | ||
1611 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxTxSize()) |
1612 | && Objects.hashCode(currentProtocol.getMaxTxSize()) | |
1613 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxTxSize())) { |
1614 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxTxSize → NO_COVERAGE |
currentProtocol.setMaxTxSize(null); |
1615 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxTxSize → NO_COVERAGE |
previousProtocol.setMaxTxSize(null); |
1616 | } | |
1617 | ||
1618 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxBhSize()) |
1619 | && Objects.hashCode(currentProtocol.getMaxBhSize()) | |
1620 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxBhSize())) { |
1621 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxBhSize → NO_COVERAGE |
currentProtocol.setMaxBhSize(null); |
1622 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxBhSize → NO_COVERAGE |
previousProtocol.setMaxBhSize(null); |
1623 | } | |
1624 | ||
1625 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getKeyDeposit()) |
1626 | && Objects.hashCode(currentProtocol.getKeyDeposit()) | |
1627 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getKeyDeposit())) { |
1628 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setKeyDeposit → NO_COVERAGE |
currentProtocol.setKeyDeposit(null); |
1629 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setKeyDeposit → NO_COVERAGE |
previousProtocol.setKeyDeposit(null); |
1630 | } | |
1631 | ||
1632 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getPoolDeposit()) |
1633 | && Objects.hashCode(currentProtocol.getPoolDeposit()) | |
1634 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getPoolDeposit())) { |
1635 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setPoolDeposit → NO_COVERAGE |
currentProtocol.setPoolDeposit(null); |
1636 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setPoolDeposit → NO_COVERAGE |
previousProtocol.setPoolDeposit(null); |
1637 | } | |
1638 | ||
1639 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxEpoch()) |
1640 | && Objects.hashCode(currentProtocol.getMaxEpoch()) | |
1641 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxEpoch())) { |
1642 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxEpoch → NO_COVERAGE |
currentProtocol.setMaxEpoch(null); |
1643 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxEpoch → NO_COVERAGE |
previousProtocol.setMaxEpoch(null); |
1644 | } | |
1645 | ||
1646 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getOptimalPoolCount()) |
1647 | && Objects.hashCode(currentProtocol.getOptimalPoolCount()) | |
1648 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getOptimalPoolCount())) { |
1649 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setOptimalPoolCount → NO_COVERAGE |
currentProtocol.setOptimalPoolCount(null); |
1650 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setOptimalPoolCount → NO_COVERAGE |
previousProtocol.setOptimalPoolCount(null); |
1651 | } | |
1652 | ||
1653 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMinUtxoValue()) |
1654 | && Objects.hashCode(currentProtocol.getMinUtxoValue()) | |
1655 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMinUtxoValue())) { |
1656 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMinUtxoValue → NO_COVERAGE |
currentProtocol.setMinUtxoValue(null); |
1657 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMinUtxoValue → NO_COVERAGE |
previousProtocol.setMinUtxoValue(null); |
1658 | } | |
1659 | ||
1660 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMinPoolCost()) |
1661 | && Objects.hashCode(currentProtocol.getMinPoolCost()) | |
1662 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMinPoolCost())) { |
1663 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMinPoolCost → NO_COVERAGE |
currentProtocol.setMinPoolCost(null); |
1664 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMinPoolCost → NO_COVERAGE |
previousProtocol.setMinPoolCost(null); |
1665 | } | |
1666 | ||
1667 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxTxExMem()) |
1668 | && Objects.hashCode(currentProtocol.getMaxTxExMem()) | |
1669 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxTxExMem())) { |
1670 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxTxExMem → NO_COVERAGE |
currentProtocol.setMaxTxExMem(null); |
1671 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxTxExMem → NO_COVERAGE |
previousProtocol.setMaxTxExMem(null); |
1672 | } | |
1673 | ||
1674 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxTxExSteps()) |
1675 | && Objects.hashCode(currentProtocol.getMaxTxExSteps()) | |
1676 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxTxExSteps())) { |
1677 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxTxExSteps → NO_COVERAGE |
currentProtocol.setMaxTxExSteps(null); |
1678 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxTxExSteps → NO_COVERAGE |
previousProtocol.setMaxTxExSteps(null); |
1679 | } | |
1680 | ||
1681 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxBlockExMem()) |
1682 | && Objects.hashCode(currentProtocol.getMaxBlockExMem()) | |
1683 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxBlockExMem())) { |
1684 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxBlockExMem → NO_COVERAGE |
currentProtocol.setMaxBlockExMem(null); |
1685 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxBlockExMem → NO_COVERAGE |
previousProtocol.setMaxBlockExMem(null); |
1686 | } | |
1687 | ||
1688 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxBlockExSteps()) |
1689 | && Objects.hashCode(currentProtocol.getMaxBlockExSteps()) | |
1690 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxBlockExSteps())) { |
1691 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxBlockExSteps → NO_COVERAGE |
currentProtocol.setMaxBlockExSteps(null); |
1692 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxBlockExSteps → NO_COVERAGE |
previousProtocol.setMaxBlockExSteps(null); |
1693 | } | |
1694 | ||
1695 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxValSize()) |
1696 | && Objects.hashCode(currentProtocol.getMaxValSize()) | |
1697 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxValSize())) { |
1698 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxValSize → NO_COVERAGE |
currentProtocol.setMaxValSize(null); |
1699 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxValSize → NO_COVERAGE |
previousProtocol.setMaxValSize(null); |
1700 | } | |
1701 | ||
1702 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getCoinsPerUtxoSize()) |
1703 | && Objects.hashCode(currentProtocol.getCoinsPerUtxoSize()) | |
1704 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getCoinsPerUtxoSize())) { |
1705 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setCoinsPerUtxoSize → NO_COVERAGE |
currentProtocol.setCoinsPerUtxoSize(null); |
1706 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setCoinsPerUtxoSize → NO_COVERAGE |
previousProtocol.setCoinsPerUtxoSize(null); |
1707 | } | |
1708 | ||
1709 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getInfluence()) |
1710 | && Objects.hashCode(currentProtocol.getInfluence()) | |
1711 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getInfluence())) { |
1712 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setInfluence → NO_COVERAGE |
currentProtocol.setInfluence(null); |
1713 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setInfluence → NO_COVERAGE |
previousProtocol.setInfluence(null); |
1714 | } | |
1715 | ||
1716 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMonetaryExpandRate()) |
1717 | && Objects.hashCode(currentProtocol.getMonetaryExpandRate()) | |
1718 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMonetaryExpandRate())) { |
1719 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMonetaryExpandRate → NO_COVERAGE |
currentProtocol.setMonetaryExpandRate(null); |
1720 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMonetaryExpandRate → NO_COVERAGE |
previousProtocol.setMonetaryExpandRate(null); |
1721 | } | |
1722 | ||
1723 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getTreasuryGrowthRate()) |
1724 | && Objects.hashCode(currentProtocol.getTreasuryGrowthRate()) | |
1725 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getTreasuryGrowthRate())) { |
1726 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setTreasuryGrowthRate → NO_COVERAGE |
currentProtocol.setTreasuryGrowthRate(null); |
1727 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setTreasuryGrowthRate → NO_COVERAGE |
previousProtocol.setTreasuryGrowthRate(null); |
1728 | } | |
1729 | ||
1730 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getDecentralisation()) |
1731 | && Objects.hashCode(currentProtocol.getDecentralisation()) | |
1732 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getDecentralisation())) { |
1733 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setDecentralisation → NO_COVERAGE |
currentProtocol.setDecentralisation(null); |
1734 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setDecentralisation → NO_COVERAGE |
previousProtocol.setDecentralisation(null); |
1735 | } | |
1736 | ||
1737 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getPriceMem()) |
1738 | && Objects.hashCode(currentProtocol.getPriceMem()) | |
1739 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getPriceMem())) { |
1740 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setPriceMem → NO_COVERAGE |
currentProtocol.setPriceMem(null); |
1741 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setPriceMem → NO_COVERAGE |
previousProtocol.setPriceMem(null); |
1742 | } | |
1743 | ||
1744 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getPriceStep()) |
1745 | && Objects.hashCode(currentProtocol.getPriceStep()) | |
1746 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getPriceStep())) { |
1747 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setPriceStep → NO_COVERAGE |
currentProtocol.setPriceStep(null); |
1748 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setPriceStep → NO_COVERAGE |
previousProtocol.setPriceStep(null); |
1749 | } | |
1750 | ||
1751 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getProtocolMajor()) |
1752 | && Objects.hashCode(currentProtocol.getProtocolMajor()) | |
1753 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getProtocolMajor()) |
1754 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
&& Objects.nonNull(currentProtocol.getProtocolMinor()) |
1755 | && Objects.hashCode(currentProtocol.getProtocolMinor()) | |
1756 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getProtocolMinor())) { |
1757 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setProtocolMajor → NO_COVERAGE |
currentProtocol.setProtocolMajor(null); |
1758 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setProtocolMajor → NO_COVERAGE |
previousProtocol.setProtocolMajor(null); |
1759 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setProtocolMinor → NO_COVERAGE |
currentProtocol.setProtocolMinor(null); |
1760 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setProtocolMinor → NO_COVERAGE |
previousProtocol.setProtocolMinor(null); |
1761 | } | |
1762 | ||
1763 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getCollateralPercent()) |
1764 | && Objects.hashCode(currentProtocol.getCollateralPercent()) | |
1765 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getCollateralPercent())) { |
1766 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setCollateralPercent → NO_COVERAGE |
currentProtocol.setCollateralPercent(null); |
1767 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setCollateralPercent → NO_COVERAGE |
previousProtocol.setCollateralPercent(null); |
1768 | } | |
1769 | ||
1770 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getMaxCollateralInputs()) |
1771 | && Objects.hashCode(currentProtocol.getMaxCollateralInputs()) | |
1772 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getMaxCollateralInputs())) { |
1773 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxCollateralInputs → NO_COVERAGE |
currentProtocol.setMaxCollateralInputs(null); |
1774 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setMaxCollateralInputs → NO_COVERAGE |
previousProtocol.setMaxCollateralInputs(null); |
1775 | } | |
1776 | ||
1777 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getEntropy()) |
1778 | && Objects.hashCode(currentProtocol.getEntropy()) | |
1779 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getEntropy())) { |
1780 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setEntropy → NO_COVERAGE |
currentProtocol.setEntropy(null); |
1781 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setEntropy → NO_COVERAGE |
previousProtocol.setEntropy(null); |
1782 | } | |
1783 | ||
1784 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (Objects.nonNull(currentProtocol.getCostModel()) |
1785 | && Objects.hashCode(currentProtocol.getCostModel()) | |
1786 |
1
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
== Objects.hashCode(previousProtocol.getCostModel())) { |
1787 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setCostModel → NO_COVERAGE |
currentProtocol.setCostModel(null); |
1788 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/ProtocolParamResponse::setCostModel → NO_COVERAGE |
previousProtocol.setCostModel(null); |
1789 | } | |
1790 | ||
1791 |
2
1. processCheckIfSameProtocol : negated conditional → NO_COVERAGE 2. processCheckIfSameProtocol : negated conditional → NO_COVERAGE |
if (currentProtocol.isNull() && previousProtocol.isNull()) { |
1792 | currentProtocol = null; | |
1793 | previousProtocol = null; | |
1794 | } | |
1795 | ||
1796 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setProtocols → NO_COVERAGE |
txResponse.setProtocols(currentProtocol); |
1797 |
1
1. processCheckIfSameProtocol : removed call to org/cardanofoundation/explorer/api/model/response/tx/TxResponse::setPreviousProtocols → NO_COVERAGE |
txResponse.setPreviousProtocols(previousProtocol); |
1798 | } | |
1799 | } | |
Mutations | ||
184 |
1.1 |
|
191 |
1.1 |
|
195 |
1.1 2.2 |
|
198 |
1.1 |
|
218 |
1.1 |
|
227 |
1.1 |
|
231 |
1.1 |
|
236 |
1.1 |
|
242 |
1.1 |
|
243 |
1.1 |
|
246 |
1.1 |
|
247 |
1.1 |
|
250 |
1.1 |
|
251 |
1.1 |
|
256 |
1.1 |
|
259 |
1.1 |
|
265 |
1.1 |
|
278 |
1.1 |
|
286 |
1.1 |
|
303 |
1.1 |
|
342 |
1.1 |
|
350 |
1.1 |
|
354 |
1.1 2.2 |
|
355 |
1.1 |
|
358 |
1.1 |
|
359 |
1.1 |
|
360 |
1.1 |
|
361 |
1.1 |
|
362 |
1.1 |
|
363 |
1.1 |
|
365 |
1.1 |
|
366 |
1.1 |
|
367 |
1.1 |
|
368 |
1.1 |
|
375 |
1.1 |
|
384 |
1.1 |
|
386 |
1.1 |
|
391 |
1.1 |
|
394 |
1.1 |
|
401 |
1.1 |
|
411 |
1.1 |
|
429 |
1.1 |
|
436 |
1.1 |
|
445 |
1.1 |
|
464 |
1.1 |
|
474 |
1.1 |
|
475 |
1.1 |
|
483 |
1.1 |
|
484 |
1.1 |
|
493 |
1.1 |
|
502 |
1.1 |
|
511 |
1.1 |
|
515 |
1.1 |
|
518 |
1.1 |
|
522 |
1.1 |
|
523 |
1.1 |
|
525 |
1.1 |
|
526 |
1.1 2.2 |
|
528 |
1.1 |
|
532 |
1.1 |
|
533 |
1.1 |
|
534 |
1.1 |
|
535 |
1.1 |
|
536 |
1.1 |
|
537 |
1.1 |
|
538 |
1.1 |
|
539 |
1.1 |
|
540 |
1.1 |
|
541 |
1.1 |
|
542 |
1.1 |
|
547 |
1.1 |
|
548 |
1.1 |
|
550 |
1.1 |
|
554 |
1.1 |
|
555 |
1.1 |
|
558 |
1.1 |
|
561 |
1.1 |
|
562 |
1.1 |
|
563 |
1.1 |
|
565 |
1.1 |
|
566 |
1.1 |
|
567 |
1.1 |
|
569 |
1.1 |
|
571 |
1.1 |
|
584 |
1.1 |
|
586 |
1.1 |
|
589 |
1.1 |
|
596 |
1.1 |
|
600 |
1.1 |
|
605 |
1.1 |
|
606 |
1.1 |
|
608 |
1.1 |
|
614 |
1.1 |
|
615 |
1.1 |
|
620 |
1.1 |
|
635 |
1.1 |
|
639 |
1.1 |
|
643 |
1.1 |
|
647 |
1.1 |
|
651 |
1.1 |
|
655 |
1.1 |
|
660 |
1.1 |
|
661 |
1.1 |
|
663 |
1.1 |
|
664 |
1.1 |
|
677 |
1.1 |
|
678 |
1.1 |
|
690 |
1.1 |
|
691 |
1.1 |
|
706 |
1.1 |
|
707 |
1.1 |
|
720 |
1.1 |
|
731 |
1.1 |
|
732 |
1.1 |
|
736 |
1.1 |
|
752 |
1.1 |
|
757 |
1.1 |
|
759 |
1.1 |
|
764 |
1.1 |
|
766 |
1.1 2.2 |
|
767 |
1.1 |
|
769 |
1.1 |
|
781 |
1.1 |
|
782 |
1.1 |
|
789 |
1.1 |
|
808 |
1.1 |
|
814 |
1.1 |
|
816 |
1.1 |
|
830 |
1.1 |
|
834 |
1.1 |
|
839 |
1.1 |
|
840 |
1.1 |
|
842 |
1.1 |
|
846 |
1.1 |
|
847 |
1.1 |
|
848 |
1.1 |
|
849 |
1.1 |
|
850 |
1.1 |
|
851 |
1.1 |
|
854 |
1.1 |
|
871 |
1.1 |
|
872 |
1.1 |
|
873 |
1.1 |
|
884 |
1.1 |
|
885 |
1.1 |
|
895 |
1.1 |
|
896 |
1.1 |
|
911 |
1.1 |
|
915 |
1.1 |
|
917 |
1.1 |
|
939 |
1.1 |
|
944 |
1.1 |
|
946 |
1.1 |
|
952 |
1.1 |
|
954 |
1.1 2.2 3.3 |
|
956 |
1.1 |
|
958 |
1.1 2.2 3.3 |
|
970 |
1.1 2.2 |
|
978 |
1.1 |
|
1029 |
1.1 |
|
1044 |
1.1 |
|
1053 |
1.1 |
|
1055 |
1.1 |
|
1058 |
1.1 |
|
1060 |
1.1 |
|
1072 |
1.1 |
|
1087 |
1.1 |
|
1094 |
1.1 |
|
1096 |
1.1 |
|
1097 |
1.1 |
|
1101 |
1.1 |
|
1102 |
1.1 |
|
1103 |
1.1 |
|
1107 |
1.1 |
|
1117 |
1.1 |
|
1120 |
1.1 |
|
1135 |
1.1 |
|
1142 |
1.1 |
|
1145 |
1.1 |
|
1146 |
1.1 |
|
1181 |
1.1 |
|
1186 |
1.1 |
|
1196 |
1.1 |
|
1199 |
1.1 |
|
1222 |
1.1 |
|
1228 |
1.1 |
|
1229 |
1.1 |
|
1247 |
1.1 2.2 |
|
1251 |
1.1 2.2 |
|
1252 |
1.1 |
|
1254 |
1.1 |
|
1269 |
1.1 2.2 |
|
1273 |
1.1 |
|
1275 |
1.1 |
|
1296 |
1.1 |
|
1298 |
1.1 |
|
1303 |
1.1 2.2 3.3 |
|
1326 |
1.1 |
|
1351 |
1.1 |
|
1359 |
1.1 2.2 |
|
1363 |
1.1 |
|
1398 |
1.1 |
|
1429 |
1.1 |
|
1446 |
1.1 |
|
1461 |
1.1 |
|
1466 |
1.1 2.2 |
|
1467 |
1.1 |
|
1470 |
1.1 |
|
1490 |
1.1 2.2 |
|
1495 |
1.1 |
|
1499 |
1.1 |
|
1529 |
1.1 |
|
1541 |
1.1 |
|
1542 |
1.1 |
|
1553 |
1.1 |
|
1567 |
1.1 |
|
1569 |
1.1 |
|
1571 |
1.1 |
|
1576 |
1.1 |
|
1578 |
1.1 |
|
1582 |
1.1 |
|
1590 |
1.1 |
|
1592 |
1.1 |
|
1593 |
1.1 |
|
1594 |
1.1 |
|
1597 |
1.1 |
|
1599 |
1.1 |
|
1600 |
1.1 |
|
1601 |
1.1 |
|
1604 |
1.1 |
|
1606 |
1.1 |
|
1607 |
1.1 |
|
1608 |
1.1 |
|
1611 |
1.1 |
|
1613 |
1.1 |
|
1614 |
1.1 |
|
1615 |
1.1 |
|
1618 |
1.1 |
|
1620 |
1.1 |
|
1621 |
1.1 |
|
1622 |
1.1 |
|
1625 |
1.1 |
|
1627 |
1.1 |
|
1628 |
1.1 |
|
1629 |
1.1 |
|
1632 |
1.1 |
|
1634 |
1.1 |
|
1635 |
1.1 |
|
1636 |
1.1 |
|
1639 |
1.1 |
|
1641 |
1.1 |
|
1642 |
1.1 |
|
1643 |
1.1 |
|
1646 |
1.1 |
|
1648 |
1.1 |
|
1649 |
1.1 |
|
1650 |
1.1 |
|
1653 |
1.1 |
|
1655 |
1.1 |
|
1656 |
1.1 |
|
1657 |
1.1 |
|
1660 |
1.1 |
|
1662 |
1.1 |
|
1663 |
1.1 |
|
1664 |
1.1 |
|
1667 |
1.1 |
|
1669 |
1.1 |
|
1670 |
1.1 |
|
1671 |
1.1 |
|
1674 |
1.1 |
|
1676 |
1.1 |
|
1677 |
1.1 |
|
1678 |
1.1 |
|
1681 |
1.1 |
|
1683 |
1.1 |
|
1684 |
1.1 |
|
1685 |
1.1 |
|
1688 |
1.1 |
|
1690 |
1.1 |
|
1691 |
1.1 |
|
1692 |
1.1 |
|
1695 |
1.1 |
|
1697 |
1.1 |
|
1698 |
1.1 |
|
1699 |
1.1 |
|
1702 |
1.1 |
|
1704 |
1.1 |
|
1705 |
1.1 |
|
1706 |
1.1 |
|
1709 |
1.1 |
|
1711 |
1.1 |
|
1712 |
1.1 |
|
1713 |
1.1 |
|
1716 |
1.1 |
|
1718 |
1.1 |
|
1719 |
1.1 |
|
1720 |
1.1 |
|
1723 |
1.1 |
|
1725 |
1.1 |
|
1726 |
1.1 |
|
1727 |
1.1 |
|
1730 |
1.1 |
|
1732 |
1.1 |
|
1733 |
1.1 |
|
1734 |
1.1 |
|
1737 |
1.1 |
|
1739 |
1.1 |
|
1740 |
1.1 |
|
1741 |
1.1 |
|
1744 |
1.1 |
|
1746 |
1.1 |
|
1747 |
1.1 |
|
1748 |
1.1 |
|
1751 |
1.1 |
|
1753 |
1.1 |
|
1754 |
1.1 |
|
1756 |
1.1 |
|
1757 |
1.1 |
|
1758 |
1.1 |
|
1759 |
1.1 |
|
1760 |
1.1 |
|
1763 |
1.1 |
|
1765 |
1.1 |
|
1766 |
1.1 |
|
1767 |
1.1 |
|
1770 |
1.1 |
|
1772 |
1.1 |
|
1773 |
1.1 |
|
1774 |
1.1 |
|
1777 |
1.1 |
|
1779 |
1.1 |
|
1780 |
1.1 |
|
1781 |
1.1 |
|
1784 |
1.1 |
|
1786 |
1.1 |
|
1787 |
1.1 |
|
1788 |
1.1 |
|
1791 |
1.1 2.2 |
|
1796 |
1.1 |
|
1797 |
1.1 |