Prasanna/surfpool poc#90
Draft
prasanna-anchorage wants to merge 5 commits intofix-jupiter-token-mappingfrom
Draft
Prasanna/surfpool poc#90prasanna-anchorage wants to merge 5 commits intofix-jupiter-token-mappingfrom
prasanna-anchorage wants to merge 5 commits intofix-jupiter-token-mappingfrom
Conversation
- Add SplTransferInfo struct to VisualizerContext for carrying SPL transfer metadata - Update VisualizerContext with new_with_transfers() constructor - Parse transaction transfers in decode_instructions and pass to visualizers - Update Jupiter swap parser to extract mint addresses from transfer data first - Fall back to heuristic-based account scanning if transfers unavailable - All Jupiter swap tests now pass with correct token identification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…iter tests This implements Phase 1 of the external integration testing framework. Key components: - SurfpoolManager: Lifecycle management for Solana mainnet fork, reusable pattern for Anvil (Ethereum) and other fork tools - TransactionBuilder: Fluent API for constructing Solana transactions - FixtureManager: Recording and replaying transaction fixtures with JSON storage - Validation utilities: Assertions and validators for transaction structure/state - NightlyTestRunner: Automated testing framework for Jupiter trading pairs - Fetches real transactions from Helius API - Tests parser against current blockchain data - Generates detailed success/failure reports - GitHub Actions workflow for daily runs Architecture follows LocalForkManager trait pattern enabling reuse across chains. This work is part of the broader External Integration Testing Proposal documented at https://github.com/anchorageoss/visualsign-parser/wiki/External-Integration-Testing-Proposal Co-Authored-By: Claude <noreply@anthropic.com
- Introduce RpcProvider trait for generic RPC implementation abstraction - Implement HeliusRpcProvider struct with Helius-specific API logic - Move all Helius API logic into HeliusRpcProvider implementation - Remove vendor-specific hardcoding from TransactionFetcher - TransactionFetcher now delegates to RpcProvider via trait - Enables future support for additional RPC providers and edge nodes - All tests pass: build succeeds, unit tests pass, nightly test works This enables a clean separation of concerns where: - RpcProvider trait: generic interface for any RPC implementation - HeliusRpcProvider: concrete Helius implementation of the trait - TransactionFetcher: consumer of trait, agnostic to RPC provider Co-Authored-By: Claude <noreply@anthropic.com>
84fceee to
eb9383c
Compare
Closed
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.
Summary
This PoC adds comprehensive testing infrastructure and deployment capabilities for Jupiter swap visualization on Solana, building on the foundation of improved token mapping.
Work Done
New: Solana Test Utils Crate (
src/solana_test_utils/)Complete testing framework including:
CI/CD Enhancement
.github/workflows/nightly-jupiter.yml)Deployment Artifacts
Minor Improvements
Testing
Running Tests Locally
Basic fixture and validation tests (no external dependencies):
Transaction validation tests:
Nightly Jupiter trading pairs test (requires Helius API key):
Surfpool Integration (Optional)
Surfpool is installed and available for advanced transaction simulation:
Note: Surfpool integration tests require the Surfpool binary and may need CLI updates for compatibility with the latest Surfpool version.
Configuration
Edit
src/solana_test_utils/config/pairs_config.tomlto customize trading pairs tested:Test Reports
Reports are generated in
src/solana_test_utils/reports/nightly/:latest.md- Human-readable reportlatest.json- Structured report dataNext Steps: Multichain Testing
To make testing truly multichain, the next step is to implement the external integration testing proposal:
→ External Integration Testing Proposal
This will enable comprehensive cross-chain testing and validation across Solana, Ethereum, and other supported chains.