Skip to content

fix(accounts): mark admin as writable in state-mutation account specs#181

Open
6figpsolseeker wants to merge 1 commit intodcccrypto:mainfrom
6figpsolseeker:fix/accounts-admin-writable-flag
Open

fix(accounts): mark admin as writable in state-mutation account specs#181
6figpsolseeker wants to merge 1 commit intodcccrypto:mainfrom
6figpsolseeker:fix/accounts-admin-writable-flag

Conversation

@6figpsolseeker
Copy link
Copy Markdown

Summary

Three admin-signed state-mutation account specs marked admin as writable: false while all 13 other admin specs use writable: true:

All three instructions modify the slab (writable: true on the slab account), confirming they are state-mutating operations. Transactions built with the old specs could fail runtime validation if the on-chain program needs the admin account to be writable.

Changes

Set writable: true on the admin account in all three specs.

Test plan

  • npm run lint clean
  • Full vitest run: same 14 pre-existing failures, zero new failures

ACCOUNTS_SET_INSURANCE_ISOLATION (line 365), ACCOUNTS_SET_OI_IMBALANCE_HARD_BLOCK
(line 501), and ACCOUNTS_SET_WALLET_CAP (line 586) all marked admin as
writable: false. Every other admin-signed state-mutation instruction in
the file (13 specs) uses writable: true. These three instructions modify
the slab (writable: true on the slab account), confirming they are
state-mutating operations where the runtime may need the admin account
to be writable (e.g., for rent or fee deduction).

Transactions built with the old specs could fail Solana runtime
validation if the on-chain program attempts to modify the admin account.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

Warning

Rate limit exceeded

@6figpsolseeker has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 35 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 24 minutes and 35 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0f9d1152-2bc4-45e2-938f-c321bcf5a1c6

📥 Commits

Reviewing files that changed from the base of the PR and between 2f80d79 and 482ae81.

📒 Files selected for processing (1)
  • src/abi/accounts.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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