org.bcos.contract.source.ConsensusControlMgr Maven / Gradle / Ivy
package org.bcos.contract.source;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.concurrent.Future;
import org.bcos.channel.client.TransactionSucCallback;
import org.bcos.web3j.abi.TypeReference;
import org.bcos.web3j.abi.datatypes.Address;
import org.bcos.web3j.abi.datatypes.Function;
import org.bcos.web3j.abi.datatypes.Type;
import org.bcos.web3j.crypto.Credentials;
import org.bcos.web3j.crypto.EncryptType;
import org.bcos.web3j.protocol.Web3j;
import org.bcos.web3j.protocol.core.methods.response.TransactionReceipt;
import org.bcos.web3j.tx.Contract;
import org.bcos.web3j.tx.TransactionManager;
/**
* Auto generated code.
* Do not modify!
* Please use the web3j command line tools, or {@link org.bcos.web3j.codegen.SolidityFunctionWrapperGenerator} to update.
*
* Generated with web3j version none.
*/
public final class ConsensusControlMgr extends Contract {
private static String BINARY = "6060604052341561000c57fe5b5b6000600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b6101cc806100606000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680639eeb30e614610051578063a74c2bb614610063578063d1d80fdf146100b5575bfe5b341561005957fe5b6100616100eb565b005b341561006b57fe5b610073610130565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100bd57fe5b6100e9600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061015b565b005b6000600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b90565b80600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505600a165627a7a72305820672043ff7329600392cc0bb599c23bb83d6b3d95dedfe5ed241002e602742e100029";
public static final String ABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"turnoff\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getAddr\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"setAddr\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"}]";
private static String GUOMI_BINARY = "6060604052341561000c57fe5b5b6000600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b6101cc806100606000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806331ef26dd146100515780639f5c50f314610063578063a6f6bef8146100b5575bfe5b341561005957fe5b6100616100eb565b005b341561006b57fe5b610073610130565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100bd57fe5b6100e9600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061015b565b005b6000600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b90565b80600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505600a165627a7a723058209e02047a986092f01dcb0122e6a0a768a3491cc5420d4246e8af331f9fc84e160029";
private ConsensusControlMgr(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, Boolean isInitByName) {
super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit, isInitByName);
if(EncryptType.encryptType == 1) super.setContractBinary(GUOMI_BINARY);
}
private ConsensusControlMgr(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, Boolean isInitByName) {
super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit, isInitByName);
if(EncryptType.encryptType == 1) super.setContractBinary(GUOMI_BINARY);
}
private ConsensusControlMgr(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit, false);
if(EncryptType.encryptType == 1) super.setContractBinary(GUOMI_BINARY);
}
private ConsensusControlMgr(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit, false);
if(EncryptType.encryptType == 1) super.setContractBinary(GUOMI_BINARY);
}
public Future turnoff() {
Function function = new Function("turnoff", Arrays.asList(), Collections.>emptyList());
return executeTransactionAsync(function);
}
public void turnoff(TransactionSucCallback callback) {
Function function = new Function("turnoff", Arrays.asList(), Collections.>emptyList());
executeTransactionAsync(function, callback);
}
public Future getAddr() {
Function function = new Function("getAddr",
Arrays.asList(),
Arrays.>asList(new TypeReference() {}));
return executeCallSingleValueReturnAsync(function);
}
public Future setAddr(Address _addr) {
Function function = new Function("setAddr", Arrays.asList(_addr), Collections.>emptyList());
return executeTransactionAsync(function);
}
public void setAddr(Address _addr, TransactionSucCallback callback) {
Function function = new Function("setAddr", Arrays.asList(_addr), Collections.>emptyList());
executeTransactionAsync(function, callback);
}
public static Future deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) {
if(EncryptType.encryptType == 1) setBinary(getGuomiBinary());
return deployAsync(ConsensusControlMgr.class, web3j, credentials, gasPrice, gasLimit, BINARY, "", initialWeiValue);
}
public static Future deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) {
if(EncryptType.encryptType == 1) setBinary(getGuomiBinary());
return deployAsync(ConsensusControlMgr.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, "", initialWeiValue);
}
public static ConsensusControlMgr load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
return new ConsensusControlMgr(contractAddress, web3j, credentials, gasPrice, gasLimit, false);
}
public static ConsensusControlMgr load(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
return new ConsensusControlMgr(contractAddress, web3j, transactionManager, gasPrice, gasLimit, false);
}
public static ConsensusControlMgr loadByName(String contractName, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
return new ConsensusControlMgr(contractName, web3j, credentials, gasPrice, gasLimit, true);
}
public static ConsensusControlMgr loadByName(String contractName, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
return new ConsensusControlMgr(contractName, web3j, transactionManager, gasPrice, gasLimit, true);
}
public static void setBinary(String binary) {
BINARY = binary;
}
public static String getGuomiBinary() {
return GUOMI_BINARY;
}
}