All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bcos.contract.source.ContractA Maven / Gradle / Ivy

There is a newer version: 2.6.6
Show newest version
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.Function;
import org.bcos.web3j.abi.datatypes.Type;
import org.bcos.web3j.abi.datatypes.Utf8String;
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 ContractA extends Contract { private static String BINARY = "6060604052341561000c57fe5b5b604060405190810160405280600481526020017f496e69740000000000000000000000000000000000000000000000000000000081525060009080519060200190610059929190610060565b505b610105565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100a157805160ff19168380011785556100cf565b828001600101855582156100cf579182015b828111156100ce5782518255916020019190600101906100b3565b5b5090506100dc91906100e0565b5090565b61010291905b808211156100fe5760008160009055506001016100e6565b5090565b90565b6103ef806101146000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680636d4ce63c1461005c5780638ac7fae5146100f557806394ab62631461014f578063ce84cf8b146101a9575bfe5b341561006457fe5b61006c610203565b60405180806020018281038252838181518152602001915080519060200190808383600083146100bb575b8051825260208311156100bb57602082019150602081019050602083039250610097565b505050905090810190601f1680156100e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156100fd57fe5b61014d600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506102ac565b005b341561015757fe5b6101a7600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506102c7565b005b34156101b157fe5b610201600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506102d4565b005b61020b61030a565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102a15780601f10610276576101008083540402835291602001916102a1565b820191906000526020600020905b81548152906001019060200180831161028457829003601f168201915b505050505090505b90565b80600090805190602001906102c292919061031e565b505b50565b6102d0816102ef565b5b50565b80600090805190602001906102ea92919061031e565b505b50565b806000908051906020019061030592919061031e565b505b50565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035f57805160ff191683800117855561038d565b8280016001018555821561038d579182015b8281111561038c578251825591602001919060010190610371565b5b50905061039a919061039e565b5090565b6103c091905b808211156103bc5760008160009055506001016103a4565b5090565b905600a165627a7a723058202fc457e6a763363a2ec916ddc0a08c37335514f6fe35478791d0162ebb9f4fd20029"; public static final String ABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"get\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"n\",\"type\":\"string\"}],\"name\":\"set1\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"n\",\"type\":\"string\"}],\"name\":\"set2\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"n\",\"type\":\"string\"}],\"name\":\"set3\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"}]"; private static String GUOMI_BINARY = "6060604052341561000c57fe5b5b604060405190810160405280600481526020017f496e69740000000000000000000000000000000000000000000000000000000081525060009080519060200190610059929190610060565b505b610105565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100a157805160ff19168380011785556100cf565b828001600101855582156100cf579182015b828111156100ce5782518255916020019190600101906100b3565b5b5090506100dc91906100e0565b5090565b61010291905b808211156100fe5760008160009055506001016100e6565b5090565b90565b6103ef806101146000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c57806395bbcc74146100f5578063a5aa40a71461014f578063b6937e7a146101a9575bfe5b341561006457fe5b61006c610203565b60405180806020018281038252838181518152602001915080519060200190808383600083146100bb575b8051825260208311156100bb57602082019150602081019050602083039250610097565b505050905090810190601f1680156100e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156100fd57fe5b61014d600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506102ac565b005b341561015757fe5b6101a7600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506102c7565b005b34156101b157fe5b610201600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506102d4565b005b61020b61030a565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102a15780601f10610276576101008083540402835291602001916102a1565b820191906000526020600020905b81548152906001019060200180831161028457829003601f168201915b505050505090505b90565b80600090805190602001906102c292919061031e565b505b50565b6102d0816102ef565b5b50565b80600090805190602001906102ea92919061031e565b505b50565b806000908051906020019061030592919061031e565b505b50565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035f57805160ff191683800117855561038d565b8280016001018555821561038d579182015b8281111561038c578251825591602001919060010190610371565b5b50905061039a919061039e565b5090565b6103c091905b808211156103bc5760008160009055506001016103a4565b5090565b905600a165627a7a72305820fb452627248a8d6e9f87f5fab6d13e53c3b353d927bd054ed54cbb90966e5c150029"; private ContractA(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 ContractA(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 ContractA(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 ContractA(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 get() { Function function = new Function("get", Arrays.asList(), Arrays.>asList(new TypeReference() {})); return executeCallSingleValueReturnAsync(function); } public Future set1(Utf8String n) { Function function = new Function("set1", Arrays.asList(n), Collections.>emptyList()); return executeTransactionAsync(function); } public void set1(Utf8String n, TransactionSucCallback callback) { Function function = new Function("set1", Arrays.asList(n), Collections.>emptyList()); executeTransactionAsync(function, callback); } public Future set2(Utf8String n) { Function function = new Function("set2", Arrays.asList(n), Collections.>emptyList()); return executeTransactionAsync(function); } public void set2(Utf8String n, TransactionSucCallback callback) { Function function = new Function("set2", Arrays.asList(n), Collections.>emptyList()); executeTransactionAsync(function, callback); } public Future set3(Utf8String n) { Function function = new Function("set3", Arrays.asList(n), Collections.>emptyList()); return executeTransactionAsync(function); } public void set3(Utf8String n, TransactionSucCallback callback) { Function function = new Function("set3", Arrays.asList(n), 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(ContractA.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(ContractA.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, "", initialWeiValue); } public static ContractA load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { return new ContractA(contractAddress, web3j, credentials, gasPrice, gasLimit, false); } public static ContractA load(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { return new ContractA(contractAddress, web3j, transactionManager, gasPrice, gasLimit, false); } public static ContractA loadByName(String contractName, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { return new ContractA(contractName, web3j, credentials, gasPrice, gasLimit, true); } public static ContractA loadByName(String contractName, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { return new ContractA(contractName, web3j, transactionManager, gasPrice, gasLimit, true); } public static void setBinary(String binary) { BINARY = binary; } public static String getGuomiBinary() { return GUOMI_BINARY; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy