- Notifications
You must be signed in to change notification settings - Fork484
feat: Add comprehensive Anchor CPI example (#393)#408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
ayushmishra2005 wants to merge1 commit intosolana-developers:mainChoose a base branch fromayushmishra2005:cpi_new_example
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Open
feat: Add comprehensive Anchor CPI example (#393)#408
ayushmishra2005 wants to merge1 commit intosolana-developers:mainfromayushmishra2005:cpi_new_example
+1,392 −0
Conversation
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
✨ Features:- Complete Anchor-based Solana program demonstrating Cross-Program Invocations (CPI)- 5 different CPI patterns: initialize, token transfer, SOL transfer, multiple CPIs, PDA authority- Comprehensive TypeScript client tests with multiple test approaches- Detailed documentation with code examples and explanations🔧 Technical Implementation:- Anchor framework with version 0.31.1 compatibility- SPL Token and System Program CPI integrations- Program Derived Address (PDA) authority patterns- Account validation and state management- Multiple test suites for different scenarios📚 Educational Value:- Detailed comments explaining each CPI step- README with comprehensive documentation- Code examples for common CPI patterns- Best practices for Anchor CPI development✅ Testing:- Program builds and compiles successfully- Deploys to local test validator- Runtime verification of CPI functionality- Multiple test approaches (Anchor workspace, custom tests)Resolvessolana-developers#393
Sign up for freeto 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.
Fixes#393
✨ Features:
🔧 Technical Implementation:
📚 Educational Value:
✅ Testing:
Resolves#393