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

IDL does not reflect types in libraries #1058

Closed
juliotpaez opened this issue Nov 24, 2021 · 6 comments
Closed

IDL does not reflect types in libraries #1058

juliotpaez opened this issue Nov 24, 2021 · 6 comments
Labels
idl related to the IDL, either program or client side

Comments

@juliotpaez
Copy link

I'm developing a project that is composed of three contracts. These contracts have in common a couple of types that I moved to a Rust library. Everything works well but the types are ignored by the IDL generator, throwing a IdlError: Type not found error.

Is there any way to include in the IDL types in another Rust library?

Thanks in advance.

@armaniferrante
Copy link
Member

Related to #454.

@edmbn
Copy link

edmbn commented Jun 9, 2022

@juliotpaez I have a very similar use case and didn't find anything either here or discord. Did you find any workaround/solution to this or the only way to go is to redefine the types in every program separately? Thank you.

@juliotpaez
Copy link
Author

Hey @edmbn, no I couldn't find any way to make it work, just manually defining them.

@edmbn
Copy link

edmbn commented Jun 15, 2022

Thank you @juliotpaez, as I thought we have to add them everywhere. Hopefully we will have a fix soon.

@Henry-E
Copy link
Contributor

Henry-E commented Jan 5, 2023

This is a known restriction of the IDL code but maybe if we're lucky kklas's new IDL code might fix this, I still have to check it out.

@acheroncrypto acheroncrypto mentioned this issue Feb 25, 2024
@acheroncrypto acheroncrypto added the idl related to the IDL, either program or client side label Mar 10, 2024
@acheroncrypto
Copy link
Collaborator

Fixed in #2824.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idl related to the IDL, either program or client side
Projects
None yet
Development

No branches or pull requests

5 participants