Skip to content

bug : Anchor IDL address misalignment. #3438

@shichen1iu

Description

@shichen1iu

When I was testing my code with TS, I found that my Anchor test code runs fine initially, but after a while, when I run anchor test --skip-deploy (without --skip-build), it throws an error.
image
At this point, when I check the address in target/idl, I find that the address is not the address of my program, but instead the address of the admin in a mod defined in the lib.
image
image
When I manually change the address in the IDL back to the correct pay... address, and then test using anchor test --skip build --skip-deploy, everything works fine.
Therefore, I think this is a bug with anchor build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    idlrelated to the IDL, either program or client side

    Type

    No type
    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