Skip to content

🚀 Implement Direction Filter for Transactions #60

@MrLutik

Description

@MrLutik

Feature Description

Implement the direction (or directions) filter for the /api/transactions endpoint to filter transactions by inbound/outbound direction relative to a specified address.

This is a split from issue #41 to track this specific feature.

Requested Behavior

Similar to Etherscan's in and out transaction filters:

# Filter inbound transactions to an address
/api/transactions?address=kira1...&direction=inbound

# Filter outbound transactions from an address
/api/transactions?address=kira1...&direction=outbound

Implementation Notes

Direction filtering requires:

  1. An address parameter must be provided (direction is relative to an address)
  2. Check message type and address fields to determine direction:
    • Inbound: Address appears in to_address field
    • Outbound: Address appears in from_address field

Current State

  • directions field is defined in QueryTxsParams struct but not implemented
  • Parameter format discussed: ?direction=inbound or ?direction=outbound

Location

  • manager/types/cosmos.go:182 - struct field exists
  • manager/gateway/cosmos_agregated3.go - needs implementation

References

Acceptance Criteria

  • Direction filter implemented (inbound/outbound)
  • Requires address parameter when using direction
  • Works with all message types that have address fields
  • Tests added for direction filtering

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions