Complex type mapping - adridadou/eth-contract-api GitHub Wiki

This library tries to map every basic types to their counter part in Java.

But sometimes a function returns more than one value. Then you should create a class to represent this.

How does it work?

The created class should have a constructor with all the return parameters in the correct order.

For example if we have a function like this one: function getM() constant returns (bool,string,uint) {return (true,"hello",34);}

you should create a class like this:

public static class MyReturnType { private Boolean val1; private String val2; private Integer val3;

    public MyReturnType(Boolean val1, String val2, Integer val3) {
        this.val1 = val1;
        this.val2 = val2;
        this.val3 = val3;
    }

}

The parameter names are irrelevant, it is only the order that matters