-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
abigen incorrect uint32/big.Int bindings #2802
Comments
I remember an issue like this being fixed a while ago. I'm guessing it was also merged in on the 1.4.x branches. Perhaps you should update to 1.4.9 and see with that? Although if you're using Native DApps I assume you use some develop sources already as 1.3.6 didn't have them at all. Please update your geth sources and retry. |
Updated to
Tried to recreate bindings - still the same problem, maybe it's because of |
I had the same issue (with current master) and I think I fixed it here: https://github.com/tbocek/go-ethereum/commit/04c5fb69fa8ff9b8d3b898a3aba132e77ea4bee7 @karalabe Can you check if that makes sense, and then I can submit a pull request |
Just upgraded to 1.5.x (current master) and still got the same isssue: Failed to report temperatures: abi: cannot unmarshal []*big.Int in to []uint32. I'll submit a pull request |
On solidity contract I have "uint32 []" type, when abigen creates Go bindings - they are also "[]uint32" type on Go side. Even though it looks like it should work - the actual type of the data coming from the chain is of type " []*big.Int". When executing contract function from Go side - getting unmarshal error: abi: cannot unmarshal []*big.Int in to []uint32 The fix is to create array with the correct type This fixed the issue reported in: ethereum#2802
On solidity contract I have "uint32 []" type, when abigen creates Go bindings - they are also "[]uint32" type on Go side. Even though it looks like it should work - the actual type of the data coming from the chain is of type " []*big.Int". When executing contract function from Go side - getting unmarshal error: abi: cannot unmarshal []*big.Int in to []uint32 The fix is to create array with the correct type This fixed the issue reported in: ethereum#2802
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
System information
Geth version: 1.3.6
OS & Version: OSX
Commit hash : 9e323d6
Expected behaviour
On solidity contract I have "uint32 []" type, when abigen creates Go bindings - they are also "[]uint32" type on Go side. Even though it looks like it should work - the actual type of the data coming from the chain is of type " []*big.Int".
Actual behaviour
When executing contract function from Go side - getting unmarshal error. Once I modify generated code myself (change types from []uint32 to []*big.Int) - everything works fine.
I could look at it myself if someone gave me directions where to look, thanks.
Steps to reproduce the behaviour
Backtrace
The text was updated successfully, but these errors were encountered: