Skip to content

Transaction History - Transaction parsing and funding transaction identification #126

@Haydart

Description

@Haydart

name: Transaction History - Transaction parsing and funding transaction identification
status: open
created: 2025-09-19T16:02:24Z
updated: 2025-09-19T16:42:04Z
github: #126
depends_on: [127, 129, 124]
parallel: false
conflicts_with: []

Task: Transaction History - Transaction parsing and funding transaction identification

Description

Implement transaction history methods in the SolanaBlockchainService class to retrieve and parse transaction data for wallet addresses. This includes general transaction history retrieval and specialized first funding transaction identification for wallet analysis.

Acceptance Criteria

  • get_transaction_history(address: str, limit: int = 100) -> List[Transaction] method implemented
  • get_first_funding_transaction(address: str) -> Optional[FundingTransaction] method implemented
  • Transaction signature retrieval using get_signatures_for_address() RPC call
  • Transaction detail parsing using get_transaction() for each signature
  • Transaction dataclass population with signature, timestamp, and basic details
  • Funding transaction identification logic (incoming SOL transfers > threshold)
  • FundingTransaction dataclass population with amount, sender, and timestamp
  • Chronological ordering of transaction history (newest first)
  • Error handling for transaction parsing failures
  • Retry logic for RPC calls with exponential backoff
  • Unit tests will be handled in Unit Testing - Comprehensive test suite with mocked responses #128

Technical Details

Implementation Approach

  • Use get_signatures_for_address() to retrieve transaction signatures with limit
  • Fetch full transaction details using get_transaction() for each signature
  • Parse transaction data to extract timestamp, amount, and counterparty information
  • Identify funding transactions by detecting incoming SOL transfers above threshold
  • Sort transactions chronologically and apply limit for transaction history
  • Handle transaction parsing errors gracefully (skip malformed transactions)

Key Considerations

  • Data Parsing: Complex transaction structure parsing for SOL transfer detection
  • Funding Logic: Define meaningful threshold for "funding" transactions (e.g., > 0.001 SOL)
  • Error Recovery: Continue processing other transactions if individual parsing fails
  • Edge Cases: Handle wallets with no transactions, failed transaction retrieval

Code Locations/Files Affected

Dependencies

Effort Estimate

  • Size: L
  • Hours: 8-10 hours
  • Parallel: false (requires core service and data models)

Definition of Done

  • get_transaction_history method implemented and functional
  • get_first_funding_transaction method implemented and functional
  • Transaction signature retrieval working correctly
  • Transaction detail parsing handling various transaction types
  • Transaction dataclass properly populated with parsed data
  • Funding transaction identification logic working correctly
  • FundingTransaction dataclass properly populated
  • Chronological ordering implemented (newest first)
  • Error handling tested for parsing failures and network issues
  • Methods return correct types as per interface
  • Unit tests will be handled in Unit Testing - Comprehensive test suite with mocked responses #128

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions