Skip to content

chore: bump anchor v1#17

Open
codewithgun wants to merge 2 commits intorelease_0.1.2from
bump-anchor-v1
Open

chore: bump anchor v1#17
codewithgun wants to merge 2 commits intorelease_0.1.2from
bump-anchor-v1

Conversation

@codewithgun
Copy link
Copy Markdown

@codewithgun codewithgun commented Apr 22, 2026

Changes

  • Upgrade to anchor v1
  • Use only bun as package manager + runtime for test instead of combined package manager such as pnpm + yarn. bun is more memory efficient

TODO

  • Close existing IDL account before deployment because the IDL account update will no longer in the program itself.
  1. Close existing IDL account before deployment
  2. Deploy anchor v1.0.0 program
  3. anchor idl init
    https://github.com/solana-foundation/anchor/blob/7b108db7987afedd1e72edd783d7fc00416e213f/docs/content/docs/updates/release-notes/1-0-0.mdx#legacy-idl-instructions-replaced-by-program-metadata

Program metadata: https://github.com/solana-program/program-metadata

@codewithgun
Copy link
Copy Markdown
Author

/bot review

@metoeraag-bot
Copy link
Copy Markdown

metoeraag-bot Bot commented Apr 23, 2026

Bot Agent progress: /bot review

Progress:

  • Repo checks (3 ok, 1 failed)
  • Context build
  • Codex review (1 pass)
  • Parallel review (Claude (API) + Codex merged)
  • Post review

Copy link
Copy Markdown

@metoeraag-bot metoeraag-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

Comment

Summary

⚠️ Limited-confidence review: check failed: bun run lint.

Posted 1 validated inline finding(s) after final filtering.

Findings
  • [P2] package.json:7 bun run lint fails in CI (5 files have Prettier issues). Run bun run lint:fix and commit the formatting changes, or this PR's lint check will stay red.
Potential concerns (lower confidence)
  • [P1] package.json:2 Setting "type": "module" at the package root while tsconfig.json still compiles to "module": "commonjs" is inconsistent and likely to break ts-mocha (which uses ts-node under the hood). Under type: module, Node/bun treat .js emitted files as ESM but the TS compiler will emit CJS require(...) calls, causing runtime errors like require is not defined or ESM/CJS interop failures when tests import CJS-only deps (e.g. @solana/spl-token, bn.js). Either (a) remove "type": "module", or (b) switch tsconfig.json to an ESM module target ("module": "NodeNext"/"ESNext" with "moduleResolution": "NodeNext") and update imports accordingly. Please confirm bun run test actually runs the test suite end-to-end on a clean checkout.
Repo checks

Repo Checks

  • LLM checks planner: added package install step before running JS commands.

  • cargo fetch --locked: ok

  • bun install --frozen-lockfile: ok

bun install v1.3.2 (b131639c)

+ @types/bn.js@5.2.0
+ @types/chai@4.3.20
+ @types/mocha@9.1.1
+ chai@4.5.0
+ mocha@9.2.2
+ prettier@2.8.8
+ ts-mocha@10.1.0
+ typescript@5.9.3
+ @anchor-lang/core@1.0.1
+ @solana/spl-token@0.4.14
+ @solana/web3.js@1.98.4
+ decimal.js@10.6.0
+ litesvm@0.1.0

190 packages installed [36.39s]
  • cargo check --workspace: ok
vent_cpi]
   | ^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default
   = note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: use of deprecated function `anchor_lang::deprecated_account_info_usage`: Use `UncheckedAccount` instead of `AccountInfo` for safer unchecked accounts.
 --> programs/dynamic-fee-sharing/src/instructions/ix_fund_fee.rs:9:1
  |
9 | #[event_cpi]
  | ^^^^^^^^^^^^
  |
  = note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: use of deprecated function `anchor_lang::deprecated_account_info_usage`: Use `UncheckedAccount` instead of `AccountInfo` for safer unchecked accounts.
 --> programs/dynamic-fee-sharing/src/instructions/ix_claim_fee.rs:9:1
  |
9 | #[event_cpi]
  | ^^^^^^^^^^^^
  |
  = note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: use of deprecated function `anchor_lang::deprecated_account_info_usage`: Use `UncheckedAccount` instead of `AccountInfo` for safer unchecked accounts.
  --> programs/dynamic-fee-sharing/src/instructions/ix_initialize_fee_vault_pda.rs:12:1
   |
12 | #[event_cpi]
   | ^^^^^^^^^^^^
   |
   = note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: use of deprecated function `anchor_lang::deprecated_account_info_usage`: Use `UncheckedAccount` instead of `AccountInfo` for safer unchecked accounts.
 --> programs/dynamic-fee-sharing/src/instructions/ix_fund_by_claiming_fee.rs:9:1
  |
9 | #[event_cpi]
  | ^^^^^^^^^^^^
  |
  = note: this warning originates in the attribute macro `event_cpi` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: `dynamic-fee-sharing` (lib) generated 5 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.12s
  • bun run lint: failed
Checking formatting...

$ prettier */*.js "*/**/*{.js,.ts}" --check
[warn] tests/claim_damm_v2.test.ts
[warn] tests/claim_dbc_creator_trading_fee.test.ts
[warn] tests/common/damm_v2.ts
[warn] tests/common/dfs.ts
[warn] tests/common/svm.ts
[warn] Code style issues found in 5 files. Forgot to run Prettier?
error: script "lint" exited with code 1

Comment thread package.json
"scripts": {
"build": "anchor build --ignore-keys",
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 bun run lint fails in CI (5 files have Prettier issues). Run bun run lint:fix and commit the formatting changes, or this PR's lint check will stay red.

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

Successfully merging this pull request may close these issues.

1 participant