use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ContractLifeCyclePrecompiled method grantManager.
public void grantManager(String contractAddr, String userAddr, TransactionSucCallback callback) {
final Function function = new Function(FUNC_GRANTMANAGER, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(contractAddr), new org.fisco.bcos.web3j.abi.datatypes.Address(userAddr)), Collections.<TypeReference<?>>emptyList());
asyncExecuteTransaction(function, callback);
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ContractLifeCyclePrecompiled method unfreeze.
public void unfreeze(String addr, TransactionSucCallback callback) {
final Function function = new Function(FUNC_UNFREEZE, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(addr)), Collections.<TypeReference<?>>emptyList());
asyncExecuteTransaction(function, callback);
}
use of org.fisco.bcos.web3j.abi.datatypes.Function in project web3sdk by FISCO-BCOS.
the class ContractLifeCyclePrecompiled method freeze.
public void freeze(String addr, TransactionSucCallback callback) {
final Function function = new Function(FUNC_FREEZE, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(addr)), 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 grantWrite.
public void grantWrite(String contractAddr, String user, TransactionSucCallback callback) {
final Function function = new Function(FUNC_GRANTWRITE, Arrays.<Type>asList(new org.fisco.bcos.web3j.abi.datatypes.Address(contractAddr), 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 getGrantWriteOutput.
public Tuple1<BigInteger> getGrantWriteOutput(TransactionReceipt transactionReceipt) {
String data = transactionReceipt.getOutput();
final Function function = new Function(FUNC_GRANTWRITE, 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());
}
Aggregations