Stack Exchange
web3j's StaticArray is abstract
I'm using newest solc and web3j on macOS (via brew).
I've compiled smartcontract and generated java code to use in my project, but the generated code uses StaticArray, which is abstract:
error: StaticArray is abstract; cannot be instantiated Arrays.<Type>asList(new org.web3j.abi.datatypes.StaticArray<org.web3j.abi.datatypes.DynamicBytes>(
My constructor in Solidity looks as follows:
constructor(string[] memory foo1, bytes[keyByteSize] memory foo2, bytes[keyByteSize] memory foo3, bytes[keyByteSize] memory foo4)
And the deploy function is generated as:
String encodedConstructor = FunctionEncoder.encodeConstructor(Arrays.<Type>asList(new org.web3j.abi.datatypes.DynamicArray<org.web3j.abi.datatypes.Utf8String>(
                        org.web3j.abi.datatypes.Utf8String.class,
                        org.web3j.abi.Utils.typeMap(foo1, org.web3j.abi.datatypes.Utf8String.class)), 
                new org.web3j.abi.datatypes.StaticArray<org.web3j.abi.datatypes.DynamicBytes>(
                        org.web3j.abi.datatypes.DynamicBytes.class,
                        org.web3j.abi.Utils.typeMap(foo2, org.web3j.abi.datatypes.DynamicBytes.class)), 
                new org.web3j.abi.datatypes.StaticArray<org.web3j.abi.datatypes.DynamicBytes>(
                        org.web3j.abi.datatypes.DynamicBytes.class,
                        org.web3j.abi.Utils.typeMap(foo3, org.web3j.abi.datatypes.DynamicBytes.class)), 
                new org.web3j.abi.datatypes.StaticArray<org.web3j.abi.datatypes.DynamicBytes>(
                        org.web3j.abi.datatypes.DynamicBytes.class,
                        org.web3j.abi.Utils.typeMap(foo4, org.web3j.abi.datatypes.DynamicBytes.class))));
        return deployRemoteCall(Foo.class, web3j, credentials, contractGasProvider, BINARY, encodedConstructor);
    }

Is it a bug, or am I doing something wrong?

I am also facing same issue. Can you please suggest exact solution.

It turned out web3j doesn't support experimental ABI
