Skip to content

Support Eden sponsored (batch) transactions in transaction summaries #3656

Description

@Qwerty5Uiop

Context

Eden chain has an EIP-2718 type 0x76 transaction that carries a batch of calls instead of a single destination. Blockscout now sends the batch data to the interpreter, but the service still renders these as a plain transfer, which is misleading: the header currently reads Transfer 0.000003 TIA to <recipient A> for a transaction that actually sent 0.000001 to recipient A and 0.000002 to recipient B.

Related: #3634

What changed in the request payload. data now carries two extra fields on Eden:

{
  "data": {
    "type": 118,
    "transaction_types": ["coin_transfer", "sponsored_transaction"],
    "to": { "hash": "0x9045…", "…": "" },
    "value": "3000000000000",
    "fee_payer": { "hash": "0x2542…", "…": "" },
    "calls": [
      { "to": "0x9045…", "value": "1000000000000", "input": "0x" },
      { "to": "0x1bcf…", "value": "2000000000000", "input": "0x" }
    ],
    "internal_transactions": []
  }
}
  • fee_payer — the sponsor that pays the fee; same address object shape as to/from, null on non-sponsored transactions.
  • calls — ordered batch; to is a checksummed address or null for a contract creation, value is a decimal string, input is a hex string. null on non-sponsored transactions.
  • to and value are compatibility fields only: to is the recipient of the first call, value is the sum of all calls. They do not describe the batch.
  • internal_transactions is always empty for these transactions — calls is the only source of the actual recipients and amounts.

What's needed

A summary template for batches, selected when "sponsored_transaction" is in transaction_types (equivalently type == 118) and calls has more than one entry. Suggested:
Batch transfer: {amount} {native} across {calls_count} calls to {recipients_count} recipients

recipients_count is the number of unique to values; count contract creations (to: null) separately rather than collapsing them into one recipient. When all calls share a single recipient, something like {action_type} {amount} {native} to {to_address} in {calls_count} calls reads better.

Single-call batches and non-sponsored transactions must keep the current template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions