|
| 1 | +package org.web3j.unittests.java; |
| 2 | + |
| 3 | +import java.math.BigInteger; |
| 4 | +import java.util.Arrays; |
| 5 | +import java.util.Collections; |
| 6 | +import java.util.List; |
| 7 | +import org.web3j.abi.TypeReference; |
| 8 | +import org.web3j.abi.datatypes.Bool; |
| 9 | +import org.web3j.abi.datatypes.Function; |
| 10 | +import org.web3j.abi.datatypes.StaticStruct; |
| 11 | +import org.web3j.abi.datatypes.Type; |
| 12 | +import org.web3j.crypto.Credentials; |
| 13 | +import org.web3j.protocol.Web3j; |
| 14 | +import org.web3j.protocol.core.RemoteCall; |
| 15 | +import org.web3j.protocol.core.RemoteFunctionCall; |
| 16 | +import org.web3j.protocol.core.methods.response.TransactionReceipt; |
| 17 | +import org.web3j.tx.Contract; |
| 18 | +import org.web3j.tx.TransactionManager; |
| 19 | +import org.web3j.tx.gas.ContractGasProvider; |
| 20 | + |
| 21 | +/** |
| 22 | + * <p>Auto generated code. |
| 23 | + * <p><strong>Do not modify!</strong> |
| 24 | + * <p>Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>, |
| 25 | + * or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the |
| 26 | + * <a href="https://github.com/web3j/web3j/tree/main/codegen">codegen module</a> to update. |
| 27 | + * |
| 28 | + * <p>Generated with web3j version none. |
| 29 | + */ |
| 30 | +@SuppressWarnings("rawtypes") |
| 31 | +public class SameInnerStructName extends Contract { |
| 32 | + public static final String BINARY = "608060405234801561000f575f80fd5b5060f18061001c5f395ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063b1a29dbb14602a575b5f80fd5b60406004803603810190603c91906084565b6042565b005b5f80fd5b5f80fd5b5f80fd5b5f60208284031215606057605f604a565b5b81905092915050565b5f60208284031215607b57607a604a565b5b81905092915050565b5f806040838503121560975760966046565b5b5f60a285828601604e565b925050602060b1858286016069565b915050925092905056fea2646970667358221220024a769b6d57f11f6f5df0145ce9d31d8dd2ec08b9a923116f016e14a0912bb464736f6c63430008140033"; |
| 33 | + |
| 34 | + private static String librariesLinkedBinary; |
| 35 | + |
| 36 | + public static final String FUNC_TEST = "test"; |
| 37 | + |
| 38 | + @Deprecated |
| 39 | + protected SameInnerStructName(String contractAddress, Web3j web3j, Credentials credentials, |
| 40 | + BigInteger gasPrice, BigInteger gasLimit) { |
| 41 | + super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit); |
| 42 | + } |
| 43 | + |
| 44 | + protected SameInnerStructName(String contractAddress, Web3j web3j, Credentials credentials, |
| 45 | + ContractGasProvider contractGasProvider) { |
| 46 | + super(BINARY, contractAddress, web3j, credentials, contractGasProvider); |
| 47 | + } |
| 48 | + |
| 49 | + @Deprecated |
| 50 | + protected SameInnerStructName(String contractAddress, Web3j web3j, |
| 51 | + TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { |
| 52 | + super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
| 53 | + } |
| 54 | + |
| 55 | + protected SameInnerStructName(String contractAddress, Web3j web3j, |
| 56 | + TransactionManager transactionManager, ContractGasProvider contractGasProvider) { |
| 57 | + super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider); |
| 58 | + } |
| 59 | + |
| 60 | + public RemoteFunctionCall<TransactionReceipt> test(Foo_Info foo, Bar_Info bar) { |
| 61 | + final Function function = new Function( |
| 62 | + FUNC_TEST, |
| 63 | + Arrays.<Type>asList(foo, |
| 64 | + bar), |
| 65 | + Collections.<TypeReference<?>>emptyList()); |
| 66 | + return executeRemoteCallTransaction(function); |
| 67 | + } |
| 68 | + |
| 69 | + @Deprecated |
| 70 | + public static SameInnerStructName load(String contractAddress, Web3j web3j, |
| 71 | + Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) { |
| 72 | + return new SameInnerStructName(contractAddress, web3j, credentials, gasPrice, gasLimit); |
| 73 | + } |
| 74 | + |
| 75 | + @Deprecated |
| 76 | + public static SameInnerStructName load(String contractAddress, Web3j web3j, |
| 77 | + TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { |
| 78 | + return new SameInnerStructName(contractAddress, web3j, transactionManager, gasPrice, gasLimit); |
| 79 | + } |
| 80 | + |
| 81 | + public static SameInnerStructName load(String contractAddress, Web3j web3j, |
| 82 | + Credentials credentials, ContractGasProvider contractGasProvider) { |
| 83 | + return new SameInnerStructName(contractAddress, web3j, credentials, contractGasProvider); |
| 84 | + } |
| 85 | + |
| 86 | + public static SameInnerStructName load(String contractAddress, Web3j web3j, |
| 87 | + TransactionManager transactionManager, ContractGasProvider contractGasProvider) { |
| 88 | + return new SameInnerStructName(contractAddress, web3j, transactionManager, contractGasProvider); |
| 89 | + } |
| 90 | + |
| 91 | + public static RemoteCall<SameInnerStructName> deploy(Web3j web3j, Credentials credentials, |
| 92 | + ContractGasProvider contractGasProvider) { |
| 93 | + return deployRemoteCall(SameInnerStructName.class, web3j, credentials, contractGasProvider, getDeploymentBinary(), ""); |
| 94 | + } |
| 95 | + |
| 96 | + public static RemoteCall<SameInnerStructName> deploy(Web3j web3j, |
| 97 | + TransactionManager transactionManager, ContractGasProvider contractGasProvider) { |
| 98 | + return deployRemoteCall(SameInnerStructName.class, web3j, transactionManager, contractGasProvider, getDeploymentBinary(), ""); |
| 99 | + } |
| 100 | + |
| 101 | + @Deprecated |
| 102 | + public static RemoteCall<SameInnerStructName> deploy(Web3j web3j, Credentials credentials, |
| 103 | + BigInteger gasPrice, BigInteger gasLimit) { |
| 104 | + return deployRemoteCall(SameInnerStructName.class, web3j, credentials, gasPrice, gasLimit, getDeploymentBinary(), ""); |
| 105 | + } |
| 106 | + |
| 107 | + @Deprecated |
| 108 | + public static RemoteCall<SameInnerStructName> deploy(Web3j web3j, |
| 109 | + TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) { |
| 110 | + return deployRemoteCall(SameInnerStructName.class, web3j, transactionManager, gasPrice, gasLimit, getDeploymentBinary(), ""); |
| 111 | + } |
| 112 | + |
| 113 | + public static void linkLibraries(List<Contract.LinkReference> references) { |
| 114 | + librariesLinkedBinary = linkBinaryWithReferences(BINARY, references); |
| 115 | + } |
| 116 | + |
| 117 | + private static String getDeploymentBinary() { |
| 118 | + if (librariesLinkedBinary != null) { |
| 119 | + return librariesLinkedBinary; |
| 120 | + } else { |
| 121 | + return BINARY; |
| 122 | + } |
| 123 | + } |
| 124 | + |
| 125 | + public static class Foo_Info extends StaticStruct { |
| 126 | + public Boolean dummy; |
| 127 | + |
| 128 | + public Foo_Info(Boolean dummy) { |
| 129 | + super(new org.web3j.abi.datatypes.Bool(dummy)); |
| 130 | + this.dummy = dummy; |
| 131 | + } |
| 132 | + |
| 133 | + public Foo_Info(Bool dummy) { |
| 134 | + super(dummy); |
| 135 | + this.dummy = dummy.getValue(); |
| 136 | + } |
| 137 | + } |
| 138 | + |
| 139 | + public static class Bar_Info extends StaticStruct { |
| 140 | + public Boolean dummy; |
| 141 | + |
| 142 | + public Bar_Info(Boolean dummy) { |
| 143 | + super(new org.web3j.abi.datatypes.Bool(dummy)); |
| 144 | + this.dummy = dummy; |
| 145 | + } |
| 146 | + |
| 147 | + public Bar_Info(Bool dummy) { |
| 148 | + super(dummy); |
| 149 | + this.dummy = dummy.getValue(); |
| 150 | + } |
| 151 | + } |
| 152 | +} |
| 153 | + |
0 commit comments