name: Token Holdings Query - SPL token account parsing and metadata enrichment
status: open
created: 2025-09-19T16:02:24Z
updated: 2025-09-19T16:42:04Z
github: #130
depends_on: [127, 129, 124]
parallel: false
conflicts_with: []
Task: Token Holdings Query - SPL token account parsing and metadata enrichment
Description
Implement the get_token_holdings() method in the SolanaBlockchainService class to retrieve and parse SPL token account data for a given wallet address. This method enriches raw token account data with metadata (name, symbol) and converts balances to human-readable format using token decimals.
Acceptance Criteria
Technical Details
Implementation Approach
- Use
get_token_accounts_by_owner() to discover SPL token accounts
- Parse token account data to extract mint address and raw balance
- Call
get_token_metadata() for each discovered token to get name/symbol
- Convert raw token balance using decimals field from token metadata
- Filter out accounts with zero balances to reduce noise
- Handle metadata retrieval failures gracefully (use mint address as fallback)
Key Considerations
- Error Recovery: Continue processing other tokens if individual metadata fails
- Edge Cases: Handle wallets with no SPL tokens, failed metadata calls
Code Locations/Files Affected
Dependencies
Effort Estimate
- Size: M
- Hours: 6-8 hours
- Parallel: false (requires core service and data models)
Definition of Done
name: Token Holdings Query - SPL token account parsing and metadata enrichment
status: open
created: 2025-09-19T16:02:24Z
updated: 2025-09-19T16:42:04Z
github: #130
depends_on: [127, 129, 124]
parallel: false
conflicts_with: []
Task: Token Holdings Query - SPL token account parsing and metadata enrichment
Description
Implement the
get_token_holdings()method in the SolanaBlockchainService class to retrieve and parse SPL token account data for a given wallet address. This method enriches raw token account data with metadata (name, symbol) and converts balances to human-readable format using token decimals.Acceptance Criteria
get_token_holdings(address: str) -> List[TokenHolding]method implementedget_token_accounts_by_owner()RPC callTechnical Details
Implementation Approach
get_token_accounts_by_owner()to discover SPL token accountsget_token_metadata()for each discovered token to get name/symbolKey Considerations
Code Locations/Files Affected
src/services/solana_blockchain_service.py(get_token_holdings method)Dependencies
Effort Estimate
Definition of Done