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

Web3j struct related issues #12

Open
Gelassen opened this issue Dec 21, 2022 · 2 comments
Open

Web3j struct related issues #12

Gelassen opened this issue Dec 21, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Gelassen
Copy link
Owner

Description

This information-only issue to track gained knowledge with struct related issues in the web3j. There are grown number of known issues in web3j which required to be written for the history.

web3j-cli autogenerate contract wrapper issue

I had issues to autogenerate wrappers for my contracts. Here is an opened issue. After the latest web3j-cli release I am able to generate wrapper for SwapValue.sol, but not for SwapChain.sol. Possible root cause is this contract uses struct with solidity address field. This post claims struct with address field is not supported yet by web3j.

RPC call from a mobile client with struct as an input param issue

When I do a call from a koltin code with a help of web3j to a solidity code, data in struct field is different from I have sent, e.g. valueOfTheFirstUser contains address of the user instead of expected tokenId and vice-versa.
I have test coverage for this logic in type-script test and it works fine. Also I have a similar scenario in another contract and it works fine. The difference between struct input params in this two scenarios is the first one contains address field.

That's all for now.

@Gelassen Gelassen added the bug Something isn't working label Dec 21, 2022
@Lokuslick
Copy link

Any updates on this issue?

@Gelassen
Copy link
Owner Author

Any updates on this issue?

Yes, there is some more news. After further work I met a few more struct related issues: most of them were not documented and I do not remember details, but here is bug report related to the last of them and PR with test case to spot this issue.

Anyway, I was able to move forward by partly autogenerate my contracts and partly write wrappers on my own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants