class ABICallSpec {

    public byte[] getEncoded() {
        byte[] functionBytes = function.getBytes(StandardCharsets.UTF_8);
        int totalLength = functionBytes.length;
        for (int i = 0; i < arguments.length; i++) {
            totalLength += arguments[i].length;
        }
        byte[] result = new byte[totalLength];
        System.arraycopy(functionBytes, 0, result, 0, functionBytes.length);
        int offset = functionBytes.length;
        for (int i = 0; i < arguments.length; i++) {
            System.arraycopy(arguments[i], 0, result, offset, arguments[i].length);
            offset += arguments[i].length;
        }
        return result;
    }

    public  ABICallSpec(String function, byte[][] arguments);

}