Skip to content

feat(scenarios): add support for Kamino programs - #5

Open
bakasura980 wants to merge 3 commits into
developfrom
feat/kamino-protocol-support
Open

feat(scenarios): add support for Kamino programs#5
bakasura980 wants to merge 3 commits into
developfrom
feat/kamino-protocol-support

Conversation

@bakasura980

@bakasura980 bakasura980 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Greptile Summary

The PR expands scenario support across six Kamino programs and improves typed account overrides, indexed array traversal, and persistent per-slot overrides.

  • Registers Kamino Lend, Scope, Farms, Swap, Vault, and Liquidity templates and IDLs.
  • Adds typed conversion and indexed traversal for nested account override paths.
  • Adds persistent override scheduling, documentation, examples, and integration coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; terminal array indices now resolve to their element type, and the account mutation path separately rejects invalid or out-of-range indices.

Important Files Changed

Filename Overview
crates/types/src/scenarios.rs Adds persistence to override instances and resolves indexed IDL paths to their terminal element type, fixing the previously reported array-index issue.
crates/core/src/surfnet/svm.rs Adds typed override conversion, checked array mutation, and persistent override rescheduling without leaving a blocking issue related to the prior finding.
crates/core/src/scenarios/registry.rs Registers the expanded Kamino template set and adds direct regression tests for terminal array element resolution.
crates/core/src/tests/kamino/mod.rs Adds live-account round-trip coverage for Kamino templates and indexed pubkey overrides.

Reviews (7): Last reviewed commit: "Move to integration tests and fix final ..." | Re-trigger Greptile

Comment thread crates/types/src/scenarios.rs Outdated
Comment thread crates/types/src/scenarios.rs Outdated
@failfmi failfmi changed the title Feat/kamino protocol support feat(scenarios): add support for Kamino programs Aug 12, 2026
Comment thread crates/types/src/scenarios.rs Outdated
Comment thread crates/types/src/scenarios.rs
Comment thread crates/core/src/surfnet/svm.rs Outdated
@bakasura980
bakasura980 force-pushed the feat/kamino-protocol-support branch from 557102b to 982f031 Compare August 13, 2026 09:32
…y slot

Addresses two review comments.

A persisted override was re-queued with fetch_before_use intact, so every
following slot pulled the whole account from mainnet again: one RPC per slot
per override, and any field the override does not write was reset to mainnet's
value, discarding what local transactions had written to it.

fetch_before_use is now cleared on the re-queue, but only after the write
succeeds, so a failed apply still retries next slot with the fetch. The
re-queue replaces a copy of itself already queued for that slot instead of
bailing out, which keeps one entry per id.

persist also gains the ts-bindings attribute its sibling fetch_before_use
already had, and the regenerated OverrideInstance.ts exposes it - the field
was previously absent from the TS SDK entirely.
@92Infinitus92

Copy link
Copy Markdown
Collaborator

The persisted re-fetch issue is fixed, but two different fetchBeforeUse overrides for the same account in one slot still fetch independently, so I believe the second drops the first change

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.

3 participants