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

undefined: abi.ConvertType for go file generated from solidity #21644

Closed
janus opened this issue Sep 30, 2020 · 7 comments
Closed

undefined: abi.ConvertType for go file generated from solidity #21644

janus opened this issue Sep 30, 2020 · 7 comments
Assignees

Comments

@janus
Copy link

janus commented Sep 30, 2020

Hi there,

Please note that this is an issue tracker reserved for bug reports and feature requests.
When I use the below command
abigen --pkg erc20 --sol gole.sol --out erc20.go to generate a go file from solidity file. However, I noticed it has a missing type abi.ConvertType from one of the goethereum libs. It leads to error message , undefined: abi.ConvertType.

System information

Geth version: 1.15
OS & Version: Linux/Ubuntu 20

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

Backtrace

[backtrace]
@ligi
Copy link
Member

ligi commented Oct 1, 2020

It's a breaking change in the API - @MariusVanDerWijden is working on it

@MariusVanDerWijden
Copy link
Member

We recently changed the abi generator in order to remove some code. You need to update your geth version to v.1.23 if you want to use the bindings generated by v.1.23. Please let me know if it still fails if you update your version to v.1.23

@janus
Copy link
Author

janus commented Oct 1, 2020

@MariusVanDerWijden Please I upgraded and I still have geth version 1.9.23-unstable. Does Beth version 1.23 exist? If yes, how can I get it?

@MariusVanDerWijden
Copy link
Member

No It doesn't exist yet, sorry. The change we made to abigen is here: #21091
Sorry for the confusion. You either need to recreate your bindings with an older version of abigen or wait until the next release.

@janus
Copy link
Author

janus commented Oct 1, 2020

@MariusVanDerWijden Okay... Please how do I set to a version and which version would pass without this error message? Sorry for the newbie question

@MariusVanDerWijden
Copy link
Member

Easiest is to download the abigen binary from here: https://geth.ethereum.org/downloads/ make sure to select geth & tools 1.9.22 .
Then you can recreate the bindings just as you did previously but this time with ./path/to/abigen ....
And then it should work. All versions < current master and v1.23-unstable should work. Only they have this change

@Decap1tator
Copy link

Encountered this error today. I'm using abigen 1.10.6-unstable-f05419f0-20210715 and it still produced a go file that contained the *abi.ConvertType syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants