use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class EvidenceVerify method getInsertEvidenceInput.
public Tuple8<String, String, String, String, byte[], BigInteger, byte[], byte[]> getInsertEvidenceInput(TransactionReceipt transactionReceipt) {
String data = transactionReceipt.getInput().substring(10);
final Function function = new Function(FUNC_INSERTEVIDENCE, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {
}, new TypeReference<Utf8String>() {
}, new TypeReference<Utf8String>() {
}, new TypeReference<Address>() {
}, new TypeReference<Bytes32>() {
}, new TypeReference<Uint8>() {
}, new TypeReference<Bytes32>() {
}, new TypeReference<Bytes32>() {
}));
List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
;
return new Tuple8<String, String, String, String, byte[], BigInteger, byte[], byte[]>((String) results.get(0).getValue(), (String) results.get(1).getValue(), (String) results.get(2).getValue(), (String) results.get(3).getValue(), (byte[]) results.get(4).getValue(), (BigInteger) results.get(5).getValue(), (byte[]) results.get(6).getValue(), (byte[]) results.get(7).getValue());
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class Ok method getTransInput.
public Tuple1<BigInteger> getTransInput(TransactionReceipt transactionReceipt) {
String data = transactionReceipt.getInput().substring(10);
final Function function = new Function(FUNC_TRANS, 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());
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class CallContract method asyncSendTransaction.
public void asyncSendTransaction(TransactionSucCallback callback, BigInteger gasPrice, BigInteger gasLimit, String contractAddress, String funcName, Type... args) {
final Function function = new Function(funcName, Arrays.<Type>asList(args), Collections.<TypeReference<?>>emptyList());
ExecuteTransaction executeTransaction = new ExecuteTransaction(contractAddress, web3j, credentials, gasPrice, gasLimit);
executeTransaction.asyncSend(function, callback);
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class CallContract method asyncSendTransaction.
public void asyncSendTransaction(TransactionSucCallback callback, String contractAddress, String funcName, Type... args) {
final Function function = new Function(funcName, Arrays.<Type>asList(args), Collections.<TypeReference<?>>emptyList());
ExecuteTransaction executeTransaction = new ExecuteTransaction(contractAddress, web3j, credentials, gasPrice, gasLimit);
executeTransaction.asyncSend(function, callback);
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ChainGovernance method grantOperator.
public void grantOperator(String user, TransactionSucCallback callback) {
final Function function = new Function(FUNC_GRANTOPERATOR, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(user)), Collections.<TypeReference<?>>emptyList());
asyncExecuteTransaction(function, callback);
}
Aggregations