3
3
import java .math .BigInteger ;
4
4
import java .util .Collections ;
5
5
import java .util .List ;
6
+ import java .util .concurrent .Callable ;
6
7
import org .web3j .abi .TypeReference ;
7
8
import org .web3j .abi .datatypes .Address ;
8
9
import org .web3j .abi .datatypes .DynamicArray ;
22
23
* or the org.web3j.codegen.SolidityFunctionWrapperGenerator in the
23
24
* <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update.
24
25
*
25
- * <p>Generated with web3j version 3.2.0 .
26
+ * <p>Generated with web3j version none .
26
27
*/
27
28
public class Arrays extends Contract {
28
29
private static final String BINARY = "6060604052341561000f57600080fd5b6102da8061001e6000396000f3006060604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633cac14c8811461005b578063b96f54d1146100c1578063beda363b14610136575b600080fd5b341561006657600080fd5b61006e610185565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156100ad578082015183820152602001610095565b505050509050019250505060405180910390f35b34156100cc57600080fd5b6100fd600461014481600a6101406040519081016040529190828261014080828437509395506101b2945050505050565b604051808261014080838360005b8381101561012357808201518382015260200161010b565b5050505090500191505060405180910390f35b341561014157600080fd5b61006e60046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496506101fe95505050505050565b61018d610274565b600060405180591061019c5750595b9080825280602002602001820160405250905090565b6101ba610286565b600a60005b818110156101f7578360001982840301600a81106101d957fe5b60200201518382600a81106101ea57fe5b60200201526001016101bf565b5050919050565b610206610274565b600080835191508160405180591061021b5750595b90808252806020026020018201604052509250600090505b818110156101f757838160010183038151811061024c57fe5b9060200190602002015183828151811061026257fe5b60209081029091010152600101610233565b60206040519081016040526000815290565b610140604051908101604052600a815b600081526020019060019003908161029657905050905600a165627a7a72305820305df0b85cbf8cf9c0720830cf03914a3044a0459d83288859a24d3dd311ef840029" ;
@@ -36,14 +37,22 @@ protected Arrays(String contractAddress, Web3j web3j, TransactionManager transac
36
37
}
37
38
38
39
public RemoteCall <List > returnArray () {
39
- Function function = new Function ("returnArray" ,
40
+ final Function function = new Function ("returnArray" ,
40
41
java .util .Arrays .<Type >asList (),
41
42
java .util .Arrays .<TypeReference <?>>asList (new TypeReference <DynamicArray <Address >>() {}));
42
- return executeRemoteCallSingleValueReturn (function , List .class );
43
+ return new RemoteCall <List >(
44
+ new Callable <List >() {
45
+ @ Override
46
+ @ SuppressWarnings ("unchecked" )
47
+ public List call () throws Exception {
48
+ List <Type > result = (List <Type >) executeCallSingleValueReturn (function , List .class );
49
+ return convertToNative (result );
50
+ }
51
+ });
43
52
}
44
53
45
54
public RemoteCall <TransactionReceipt > fixedReverse (List <BigInteger > input ) {
46
- Function function = new Function (
55
+ final Function function = new Function (
47
56
"fixedReverse" ,
48
57
java .util .Arrays .<Type >asList (new org .web3j .abi .datatypes .generated .StaticArray10 <org .web3j .abi .datatypes .generated .Uint256 >(
49
58
org .web3j .abi .Utils .typeMap (input , org .web3j .abi .datatypes .generated .Uint256 .class ))),
@@ -52,7 +61,7 @@ public RemoteCall<TransactionReceipt> fixedReverse(List<BigInteger> input) {
52
61
}
53
62
54
63
public RemoteCall <TransactionReceipt > dynamicReverse (List <BigInteger > input ) {
55
- Function function = new Function (
64
+ final Function function = new Function (
56
65
"dynamicReverse" ,
57
66
java .util .Arrays .<Type >asList (new org .web3j .abi .datatypes .DynamicArray <org .web3j .abi .datatypes .generated .Uint256 >(
58
67
org .web3j .abi .Utils .typeMap (input , org .web3j .abi .datatypes .generated .Uint256 .class ))),
0 commit comments