Skip to content

SEP-41 Transfer events silently dropped (topic vs data mismatch) #5

Description

@DeFiVC

What

Standard SEP-41 Soroban token contracts emit Transfer events with from, to, and amount in the topics array (["Transfer", Address(from), Address(to), U128(amount)]), not in the value/data payload. The parseEvent function only extracts topicValues[0] as the event name and discards the remaining topic values. It then reads rawEvent.value as the event data. For standard SEP-41 tokens, rawEvent.value is empty or does not contain a {from, to, amount} map.

Why

No token transfers are ever indexed. The processor at token-transferred.ts:22 destructures { from, to, amount } from event.data, which would be undefined/empty, causing the validation to fail and silently skip every Transfer event.

Scope

  • Parse Transfer event data from the topics array instead of the value payload
  • Or handle both formats (custom events vs standard SEP-41)

Acceptance Criteria

  • SEP-41 Transfer events are correctly parsed and indexed
  • Token transfers appear in the indexed data

Technical Context

  • File: src/indexer/event-listener.ts, lines 172-175
  • File: src/indexer/processors/token-transferred.ts, line 22
  • SEP-41 Transfer event format: topics = ["Transfer", Address(from), Address(to), U128(amount)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions