use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ChainGovernance method unfreezeAccount.
public void unfreezeAccount(String account, TransactionSucCallback callback) {
final Function function = new Function(FUNC_UNFREEZEACCOUNT, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(account)), 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 getUpdateThresholdInput.
public Tuple1<BigInteger> getUpdateThresholdInput(TransactionReceipt transactionReceipt) {
String data = transactionReceipt.getInput().substring(10);
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());
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ChainGovernance method updateThreshold.
public void updateThreshold(BigInteger threshold, TransactionSucCallback callback) {
final Function function = new Function(FUNC_UPDATETHRESHOLD, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.generated.Int256(threshold)), 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 freezeAccount.
public void freezeAccount(String account, TransactionSucCallback callback) {
final Function function = new Function(FUNC_FREEZEACCOUNT, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(account)), 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 getGrantOperatorInput.
public Tuple1<String> getGrantOperatorInput(TransactionReceipt transactionReceipt) {
String data = transactionReceipt.getInput().substring(10);
final Function function = new Function(FUNC_GRANTOPERATOR, 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());
}
Aggregations