-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Overloading with different int types produces an error in generated Java Wrapper class #2097
Comments
And sometimes there is existing code in a project which you cant change that easy :) Or if I dont need this "putValue" function, is there a chance to ignore it during wrapper code generation? |
@Julius278 thanks for pointing this out, we are aware of it. We tried in the past to work on this but was kind of hard to find a solution as we want it to keep it generic too. We don't have a concrete solution for the wrapper generation moment, you can comment out one of the methods, but is not the smartest thing. Also in the past we tend to do generate smart contracts wrappers with method1 and method2 for the methods which were overloading, would it be a solution for you? |
btw @Julius278 as I see you are interested in Web3j I'm working now on planning an online Hyperledger Web3j Summit to getter as much feedback as possible from users. Please add me on Linkedin to give more details if you are interested in. https://www.linkedin.com/in/george-tebrean/ |
Hey @gtebrean, Keeping it generic is a good way, I will also think about it in a quite minute. Okay, my workaround was to deploy it via JavaScript and not generate the contract (it's only used in other contracts, not directly from a user). I'll have to check with some colleagues if we can rename the overloaded functions. Best regards, |
Hello Guys
and instead of overloading the functions in java , just having if else statement. This is just a thought of mine . I don't know the background working of this . |
Thanks @rohandakua for your suggestion, we are taking it in the consideration. Also for next 2 weeks I will be of, so if any of you would like to contribute and to propose any PR until I'm back feel free. |
Issue_title
Overloading is in Solidity as in Java no bigger problem. Its different when it comes to generating signed and unsigned integers.
Issue_description
here is a test smart contract to reproduce the issue:
`contract TestContract {
}`
when you generate the Java Wrapper code, it produces this error:
Issue_context
I know that Java Integer, Long or BigInteger have value ranges as Solidity int (int256) and there are no unsigned integer values. But has someone already thought about overloading like in the above scenario?
The text was updated successfully, but these errors were encountered: