Squads-Protocol / v4

Squads V4
https://v4-sdk-typedoc.vercel.app
GNU Affero General Public License v3.0
89 stars 32 forks source link

Tests give wrong program error #120

Closed Henry-E closed 2 weeks ago

Henry-E commented 2 months ago

Something worth investigating if the goal is to make the tests easy to run from scratch.

https://github.com/Squads-Protocol/v4/blob/c5340ae95ca3723a8426088de5d1dbca06f147f5/Anchor.toml#L9-L10 The program here has a different name to the cargo.toml here

https://github.com/Squads-Protocol/v4/blob/c5340ae95ca3723a8426088de5d1dbca06f147f5/programs/squads_multisig_program/Cargo.toml#L10

Not 100% sure but I think these two names have to line up if the program is to be uploaded at the correct address when running local net. Otherwise you get this error.

    'Program log: AnchorError occurred. Error Code: DeclaredProgramIdMismatch. Error Number: 4100. Error Message: The declared program id does not match the actual program id.',

That said, I haven't actually been able to fix or get the tests running by changing the name in the anchor.toml, so I'm guessing other stuff in the tests rely on that program being called multisig. Again not 100% sure as I haven't been able to actually get it working but the mismatching names seem incorrect at the very least.

Henry-E commented 2 weeks ago

This issue only happens when doing unintended approach of running anchor test instead of the correct testing commend yarn test.