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

abigen not supporting interface types as arguments #27551

Closed
pyropy opened this issue Jun 23, 2023 · 3 comments
Closed

abigen not supporting interface types as arguments #27551

pyropy opened this issue Jun 23, 2023 · 3 comments

Comments

@pyropy
Copy link

pyropy commented Jun 23, 2023

Seems like abigen does not support interface types. When trying to generate code for following ABI I get this error Fatal: Failed to generate ABI binding: unsupported arg type: ICvx

[{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ConvertCrvToCvx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cvx","outputs":[{"internalType":"contract ICvx","name":"","type":"ICvx"}],"stateMutability":"view","type":"function"}]

Is there some way around this?

@jsvisa
Copy link
Contributor

jsvisa commented Jun 24, 2023

Are you given abigen the inner contract type(ICVx) of {"internalType":"contract ICvx","name":"","type":"ICvx"}

@pyropy
Copy link
Author

pyropy commented Jun 26, 2023

No, this is the ABI I've found on etherscan

@jsvisa
Copy link
Contributor

jsvisa commented Jun 26, 2023

You need the contract interface of ICVx

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

3 participants