use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ChainGovernance method getUnfreezeAccountOutput.
public Tuple1<BigInteger> getUnfreezeAccountOutput(TransactionReceipt transactionReceipt) {
String data = transactionReceipt.getOutput();
final Function function = new Function(FUNC_UNFREEZEACCOUNT, 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());
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ChainGovernance method getGrantOperatorOutput.
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());
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ChainGovernance method revokeOperator.
public void revokeOperator(String user, TransactionSucCallback callback) {
final Function function = new Function(FUNC_REVOKEOPERATOR, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(user)), Collections.<TypeReference<?>>emptyList());
asyncExecuteTransaction(function, callback);
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ChainGovernance method grantCommitteeMember.
public void grantCommitteeMember(String user, TransactionSucCallback callback) {
final Function function = new Function(FUNC_GRANTCOMMITTEEMEMBER, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(user)), Collections.<TypeReference<?>>emptyList());
asyncExecuteTransaction(function, callback);
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class Permission method getInsertInput.
public Tuple2<String, String> getInsertInput(TransactionReceipt transactionReceipt) {
String data = transactionReceipt.getInput().substring(10);
final Function function = new Function(FUNC_INSERT, Arrays.<Type>asList(), Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {
}, new TypeReference<Utf8String>() {
}));
List<Type> results = FunctionReturnDecoder.decode(data, function.getOutputParameters());
;
return new Tuple2<String, String>((String) results.get(0).getValue(), (String) results.get(1).getValue());
}
Aggregations