0

I’m trying to call a smart contracts function which gets “tuple []” as an argument. Each tuple represents a Fee object in the smart contract

struct Fee {
    uint16 rate;
    address payable recipient;
}

I don’t understand how to specify this data type during creation of Function object which would be passed via transaction.

        Function function = new Function(
            "functionName",
            Arrays.asList(___???___),
            Collections.emptyList()
        );

As I understood I need to use types which are recognized by Solidity.

For this I use the extentions of org.web3j.abi.datatypes.Type;

But problem is that Array and StaticArray can’t consist of Tuple2<Uint16, Address> elements.

What data types I should use for such argument?

0 Answers0