You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
Description
This information-only issue to track gained knowledge with
struct
related issues in theweb3j
. There are grown number of known issues inweb3j
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 forSwapChain.sol
. Possible root cause is this contract usesstruct
with solidityaddress
field. This post claimsstruct
withaddress
field is not supported yet byweb3j
.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 ofweb3j
to asolidity
code, data instruct
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 containsaddress
field.That's all for now.
The text was updated successfully, but these errors were encountered: