hyperledger-web3j/web3j

Can not generate java class of static struct in some case.

hatake55k opened this issue · 0 comments

The generated code does not contain the struct that is defined in static array

Solidity

struct Player {
       address addr; 
       uint256 timeLeft; 
}
struct Config{ 
        uint64 index; 
        Player[2] players; 
    }

Generated warpper

public static class Config extends StaticStruct {
        public BigInteger index;
        public List<Player> players;
}

I can not find the Class of Player .
But it successfully generates when I modity the static array to dynamic, like this:

struct Config{ 
        uint64 index; 
        Player[] players; 
    }
  • Is it unimplemented feature or bug?
  • Should I avoid to use struct in static array when i try to generate wrapper?

web3j version: 4.11.1