org.fisco.bcos.web3j.abi.datatypes.generated.Uint64 Java Examples
The following examples show how to use
org.fisco.bcos.web3j.abi.datatypes.generated.Uint64.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlockInfoServiceTest.java From WeBASE-Collect-Bee with Apache License 2.0 | 5 votes |
@Test public void testInput() throws IOException { Block block = ethClient.getBlock(BigInteger.valueOf(8677)); List<TransactionResult> transactionResults = block.getTransactions(); log.info("transactionResults.size:{}", transactionResults.size()); for (TransactionResult result : transactionResults) { BcosTransactionReceipt ethGetTransactionReceipt = web3j.getTransactionReceipt((String) result.get()).send(); Optional<TransactionReceipt> opt = ethGetTransactionReceipt.getTransactionReceipt(); if (opt.isPresent()) { log.info("TransactionReceipt hash: {}", opt.get().getTransactionHash()); Optional<Transaction> optt = web3j.getTransactionByHash(opt.get().getTransactionHash()).send().getTransaction(); if (optt.isPresent()) { log.info("transaction hash : {}", optt.get().getHash()); log.info("transaction info : {}", optt.get().getValue()); List<Type> lt = new ArrayList<>(); lt.add(Uint64.DEFAULT); List<TypeReference<?>> references = new ArrayList<>(); TypeReference<Uint64> typeReference = new TypeReference<Uint64>() { }; references.add(typeReference); List<TypeReference<Type>> ll = Utils.convert(references); List<Type> inputList = FunctionReturnDecoder.decode(optt.get().getInput(), ll); log.info("input : {}", inputList.size()); log.info("input : {}", JacksonUtils.toJson(inputList)); } } } }