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

Is any way to use type aliases? #1300

Closed
insky opened this issue Jan 11, 2022 · 1 comment · Fixed by #2637
Closed

Is any way to use type aliases? #1300

insky opened this issue Jan 11, 2022 · 1 comment · Fixed by #2637
Labels
idl related to the IDL, either program or client side

Comments

@insky
Copy link

insky commented Jan 11, 2022

I'm trying to do something like

pub type EthereumAddress = [u8; 20];

pub fn foo(
    ctx: Context<Foo>,
    eth_address: EthereumAddress,
) -> ProgramResult {

When I run anchor test it throws the following error

IdlError: Type not found: {"name":"ethAddress","type":{"defined":"EthereumAddress"}}

Do you have any idea about this?

Thank you!

@vpontis
Copy link
Contributor

vpontis commented May 1, 2022

Related #1632

@acheroncrypto acheroncrypto added the idl related to the IDL, either program or client side label Sep 27, 2023
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

Successfully merging a pull request may close this issue.

3 participants