Skip to content
This repository was archived by the owner on May 2, 2025. It is now read-only.
This repository was archived by the owner on May 2, 2025. It is now read-only.

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

Description

@billythedummy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions