feat(cli): Add program ID mismatch check before building#4018
feat(cli): Add program ID mismatch check before building#4018jacobcreech merged 28 commits intosolana-foundation:masterfrom
Conversation
|
@swaroop-osec is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
83bfe87 to
fc516a5
Compare
|
Approach LGTM once test failures are fixed |
| ); | ||
| const myAccount = await program.account.myAccount.fetch( | ||
| pubkeys.myAccount | ||
| pubkeys.myAccount as anchor.web3.PublicKey |
There was a problem hiding this comment.
🤔 What change caused this to be needed?
There was a problem hiding this comment.
Tbh I really have no idea some times the typescript raises errors. And the tests were passed locally without this change. Another example
|
We use IMO regex based |
…cross all basic examples
…dation#4018) * feat(cli): Add program ID mismatch check before building * feat(cli): Skip program ID mismatch check if --skip-lint is used * chore(tests): Add --skip-lint option to anchor build command * fix(tests): Sync keys before building programs in safety checks * fix(cli): Update program ID mismatch message to include '--skip-lint' option * chore(tests): Fix safety-checks test * fix(tests): Fix typescript error * chore(tests): Add cleanup commands to safety-checks test * refactor(tests): Update confirmation options in CPI return and events tests * refactor(tests): prettier * feat(cli): Introduce --ignore-keys option to skip program ID mismatch checks * refactor(tests): Restore test.sh from master * fix(tests): Update safety-checks test to use --ignore-keys * refactor(cli): Clippy Fixes * chore(tutorial): Update test script to include --ignore-keys option across all basic examples * fix(tests): Format bench.json * fix(tests): Add --ignore-keys option to stack-memory test build command * fix(tests): Remove newline at end of bench.json * fix(tests): Format stack-memory.ts * feat(docs): Update CHANGELOG.md * fix(tests): Set ignore_keys to true in anchor test * fix(tests): Remove --ignore-keys option from anchor test * feat(cli): Updated docs * refactor(cli): Fix clippy warnings * chore: fix merge conflict * fix: merge conflict --------- Co-authored-by: Jacob Creech <82475023+jacobcreech@users.noreply.github.com> Co-authored-by: Jacob Creech <jacob.creech@solana.com>
Closes #3985
declare_id!in the source code during the build step. If a mismatch is detected, it returns an error prompting the user to runanchor keys sync--ignore-keysflag.