Java Code Examples for org.fisco.bcos.web3j.protocol.core.methods.response.TransactionReceipt#getOutput()
The following examples show how to use
org.fisco.bcos.web3j.protocol.core.methods.response.TransactionReceipt#getOutput() .
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: ContractLifeCyclePrecompiled.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getFreezeOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_FREEZE, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 2
Source File: ChainGovernance.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getRevokeOperatorOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_REVOKEOPERATOR, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 3
Source File: ChainGovernance.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getFreezeAccountOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_FREEZEACCOUNT, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 4
Source File: ChainGovernance.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getGrantOperatorOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_GRANTOPERATOR, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 5
Source File: ChainGovernance.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getRevokeCommitteeMemberOutput( TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_REVOKECOMMITTEEMEMBER, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 6
Source File: ChainGovernance.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getUpdateThresholdOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_UPDATETHRESHOLD, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 7
Source File: Permission.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getInsertOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_INSERT, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 8
Source File: Permission.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getRemoveOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_REMOVE, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 9
Source File: EvidenceVerify.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<String> getInsertEvidenceOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_INSERTEVIDENCE, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<String>((String) results.get(0).getValue()); }
Example 10
Source File: ContractLifeCyclePrecompiled.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getGrantManagerOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_GRANTMANAGER, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 11
Source File: EvidenceSignersData.java From WeBASE-Front with Apache License 2.0 | 5 votes |
public Tuple1<String> getNewEvidenceOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function(FUNC_NEWEVIDENCE, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());; return new Tuple1<String>( (String) results.get(0).getValue() ); }
Example 12
Source File: ContractLifeCyclePrecompiled.java From web3sdk with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getUnfreezeOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_UNFREEZE, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Int256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<BigInteger>((BigInteger) results.get(0).getValue()); }
Example 13
Source File: TestGroupSig.java From group-signature-client with GNU General Public License v3.0 | 5 votes |
public Tuple1<Boolean> getVerify_group_sigOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function( FUNC_VERIFY_GROUP_SIG, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters()); ; return new Tuple1<Boolean>((Boolean) results.get(0).getValue()); }
Example 14
Source File: Topic.java From WeEvent with Apache License 2.0 | 5 votes |
public Tuple1<Boolean> getAddTopicACLOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function(FUNC_ADDTOPICACL, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());; return new Tuple1<Boolean>( (Boolean) results.get(0).getValue() ); }
Example 15
Source File: Topic.java From WeEvent with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getDelOperatorOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function(FUNC_DELOPERATOR, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());; return new Tuple1<BigInteger>( (BigInteger) results.get(0).getValue() ); }
Example 16
Source File: Topic.java From WeEvent with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getPublishWeEventOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function(FUNC_PUBLISHWEEVENT, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());; return new Tuple1<BigInteger>( (BigInteger) results.get(0).getValue() ); }
Example 17
Source File: Topic.java From WeEvent with Apache License 2.0 | 5 votes |
public Tuple1<BigInteger> getAddOperatorOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function(FUNC_ADDOPERATOR, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());; return new Tuple1<BigInteger>( (BigInteger) results.get(0).getValue() ); }
Example 18
Source File: TopicController.java From WeEvent with Apache License 2.0 | 5 votes |
public Tuple1<Boolean> getAddTopicInfoOutput(TransactionReceipt transactionReceipt) { String data = transactionReceipt.getOutput(); final Function function = new Function(FUNC_ADDTOPICINFO, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Bool>() {})); List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());; return new Tuple1<Boolean>( (Boolean) results.get(0).getValue() ); }
Example 19
Source File: PrecompiledCommon.java From web3sdk with Apache License 2.0 | 5 votes |
public static String handleTransactionReceipt(TransactionReceipt receipt, Web3j web3j) throws TransactionException, IOException { String status = receipt.getStatus(); if (!"0x0".equals(status)) { throw new TransactionException( StatusCode.getStatusMessage(receipt.getStatus(), receipt.getMessage())); } else { if (receipt.getOutput() != null) { return PrecompiledCommon.getJsonStr(receipt.getOutput(), web3j); } else { throw new TransactionException("Transaction is handled failure."); } } }
Example 20
Source File: TestTxDecode.java From web3sdk with Apache License 2.0 | 4 votes |
public static void main(String[] args) throws Exception { TransactionDecoder transactionDecoder = TransactionDecoderFactory.buildTransactionDecoder("TableTest"); TransactionReceipt txReceipt = sentTx(); // decode input System.out.println("===================decode input==================="); String input = txReceipt.getInput(); String inputResult1 = transactionDecoder.decodeInputReturnJson(input); InputAndOutputResult inputResult2 = transactionDecoder.decodeInputReturnObject(input); System.out.println(inputResult1); System.out.println(inputResult2); System.out.println(); // decode output System.out.println("===================decode output==================="); String output = txReceipt.getOutput(); String outputResult1 = transactionDecoder.decodeOutputReturnJson(input, output); InputAndOutputResult outputResult2 = transactionDecoder.decodeOutputReturnObject(input, output); System.out.println(outputResult1); System.out.println(outputResult2); System.out.println(); // decode event System.out.println("===================decode event==================="); List<Log> logList = txReceipt.getLogs(); String logJson = ObjectMapperFactory.getObjectMapper().writeValueAsString(logList); String eventResult1 = transactionDecoder.decodeEventReturnJson(logJson); Map<String, List<List<EventResultEntity>>> eventResult2 = transactionDecoder.decodeEventReturnObject(logList); System.out.println(eventResult1); System.out.println(eventResult2); System.exit(0); }