Skip to content

feat: add carrot-deposit feature#38

Open
ChiefWoods wants to merge 2 commits intoblueshift-gg:masterfrom
ChiefWoods:feat/carrot-deposit
Open

feat: add carrot-deposit feature#38
ChiefWoods wants to merge 2 commits intoblueshift-gg:masterfrom
ChiefWoods:feat/carrot-deposit

Conversation

@ChiefWoods
Copy link
Copy Markdown
Contributor

@ChiefWoods ChiefWoods commented Mar 19, 2026

Summary

Changes

Testing

  • make format
  • make clippy
  • make test
  • make test-upstream (if relevant)

Protocol integration checklist (if applicable)

  • Feature flag added and used for all protocol code
  • Action context enums updated
  • Detection logic updated
  • Account parsing validates count and types
  • Tests added or updated

@ChiefWoods ChiefWoods force-pushed the feat/carrot-deposit branch 2 times, most recently from 193a654 to 7534611 Compare March 19, 2026 13:15
@ChiefWoods ChiefWoods marked this pull request as ready for review March 21, 2026 05:49
@L0STE L0STE mentioned this pull request Mar 24, 2026
9 tasks
@L0STE
Copy link
Copy Markdown
Contributor

L0STE commented Mar 24, 2026

deposit_signed takes remaining_accounts: &[AccountView] as a function parameter — this breaks the Deposit trait signature and won't compile.

The right pattern is what Drift does in #33: capture remaining accounts in the struct via TryFrom, not as a function arg. The context router already passes the full account slice to your TryFrom, so you get them for free:

let [clend_program, clend_group, clend_account, signer, bank,
     signer_token_account, bank_liquidity_vault, token_program,
     remaining_accounts @ ..] = accounts

Then read ctx.remaining_accounts inside deposit_signed. Your push! macro CPI logic is fine — just rewire it.

Rebase onto #33 once it lands.

@ChiefWoods ChiefWoods force-pushed the feat/carrot-deposit branch from 5c5c441 to 4881dfc Compare March 24, 2026 18:06
@ChiefWoods ChiefWoods force-pushed the feat/carrot-deposit branch from 4881dfc to 45f6cdf Compare March 27, 2026 08:31
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.

2 participants