Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hatake55k opened this issue May 15, 2024 · 0 comments
Open

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

hatake55k opened this issue May 15, 2024 · 0 comments
Assignees
Labels
needs-review issue/PR needs review from maintainer

Comments

@hatake55k
Copy link

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

@hatake55k hatake55k added the needs-review issue/PR needs review from maintainer label May 15, 2024
@NickSneo NickSneo self-assigned this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review issue/PR needs review from maintainer
Projects
None yet
Development

No branches or pull requests

2 participants