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

ts: IDL PDA seeds are typed as any #2750

Closed
acheroncrypto opened this issue Dec 28, 2023 · 4 comments
Closed

ts: IDL PDA seeds are typed as any #2750

acheroncrypto opened this issue Dec 28, 2023 · 4 comments
Labels
good first issue Good for newcomers ts

Comments

@acheroncrypto
Copy link
Collaborator

Problem

IDL PDA seeds are typed as any in TS package:

export type IdlPda = {
seeds: IdlSeed[];
programId?: IdlSeed;
};
export type IdlSeed = any; // TODO

Solution

Add the actual types instead of using any.

@acheroncrypto acheroncrypto added ts good first issue Good for newcomers labels Dec 28, 2023
@Nishchay1571999
Copy link

Can i take this up?

@Nishchay1571999
Copy link

Nishchay1571999 commented Dec 30, 2023

hi @acheroncrypto I went through the type.rs file in ./lang/syn/src/idl/type.rs file and came up with this particular. Type
export type IdlSeed = { ty: IdlType, value: IdlType, account?:string, path?:string };

It sounds kind of right Is there anything I might be missing?

mohitvdx added a commit to mohitvdx/anchor that referenced this issue Dec 31, 2023
@acheroncrypto
Copy link
Collaborator Author

Hey, thanks for your interest in contributing but #2752 has been created before your initial comment.

@acheroncrypto
Copy link
Collaborator Author

Added in #2752

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers ts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants