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

Find example of anchor IDL with account using namespaced accounts #1

Open
billythedummy opened this issue Dec 14, 2022 · 0 comments
Open

Comments

@billythedummy
Copy link
Contributor

billythedummy commented Dec 14, 2022

Apparently in anchor if you do

#[account("my_namespace")]
pub struct MyAccount {
  ...
}

Your account discriminator sha256 pre-image becomes "my_namespace:{account_name}" instead of "account:{account_name}".

Haven't found an example of how that's represented in the IDL yet.

Reference: https://github.com/coral-xyz/anchor/blob/f79f9dab740cb6be0df678ec547c5c3b1209f518/lang/attribute/account/src/lib.rs#L74-L109

billythedummy pushed a commit that referenced this issue Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant