feat: add BisonFi override templates - #8
Open
bakasura980 wants to merge 2 commits into
Open
Conversation
…eChain/surfpool into feat/bisonfi-support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BisonFi publishes no IDL and is not an Anchor program, so this adds a raw byte-layout write path guarded by account size and magic, plus four templates on it: price, depth, spread and freshness.
Also introduces optional IDLs on templates, so a program without one no longer needs a reconstructed IDL in the repo.
Greptile Summary
The PR adds raw byte-layout scenario overrides for non-Anchor programs without published IDLs and introduces four bundled BisonFi templates.
Confidence Score: 5/5
The PR appears safe to merge because no blocking failure remains within the scope of the follow-up review.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Scheduled scenario override] --> B[Resolve target account] B --> C{Template has raw_layout?} C -->|Yes| D[Validate account size and magic] D --> E[Encode supplied property values] E --> F[Write bytes at declared offsets] F --> G[Store modified account] C -->|No| H[Resolve registered program IDL] H --> I[Apply IDL-based account override] I --> GReviews (2): Last reviewed commit: "Merge branch 'feat/kamino-protocol-suppo..." | Re-trigger Greptile