# Transaction attributes

> Attributes of the send and confirm spans of transactions: blockchain.tx.*, blockchain.contract.* and blockchain.block.number.

Source: https://hashspan.dev/docs/reference/attributes/transactions

Generated from the semantic conventions These rows are generated from the semantic conventions at @hashspan/core@1.1.0, the version on npm. They are a draft: names can still change.

Attributes of the send and confirm spans of transactions: `blockchain.tx.*`, `blockchain.contract.*` and `blockchain.block.number`. *Default* is what is recorded without configuration; addresses follow the address mode described under [privacy](https://hashspan.dev/docs/reference/semantic-conventions#privacy).

## `blockchain.tx.hash`

| Type | Spans | Default |
|---|---|---|
| string | send, confirm, payment | on |

`0x`-prefixed tx hash; on a payment span, the settling transaction's, when reported; on a user operation's confirm span, the bundle transaction's; absent on a user operation's send span

## `blockchain.tx.from`

| Type | Spans | Default |
|---|---|---|
| string | send | raw |

sender address, subject to address mode

## `blockchain.tx.to`

| Type | Spans | Default |
|---|---|---|
| string | send | raw |

recipient / contract address, subject to address mode

## `blockchain.tx.value`

| Type | Spans | Default |
|---|---|---|
| string | send | on |

value in wei, decimal string

## `blockchain.tx.nonce`

| Type | Spans | Default |
|---|---|---|
| int | send | on |

sender nonce, when the sending call passes one (a nonce the wallet or viem picks is not known to the adapter)

## `blockchain.tx.authorization.count`

| Type | Spans | Default |
|---|---|---|
| int | send | on |

number of EIP-7702 authorizations a type 4 transaction carries

## `blockchain.tx.authorization.addresses`

| Type | Spans | Default |
|---|---|---|
| string[] | send | raw |

delegated contract address of each well-formed authorization, subject to address mode, at most 64; `0x000...0` clears a delegation

## `blockchain.tx.authorization.chain_ids`

| Type | Spans | Default |
|---|---|---|
| int[] | send | on |

chain id of each well-formed authorization, in the order of the addresses, at most 64; `0` means valid on every chain

## `blockchain.contract.function.name`

| Type | Spans | Default |
|---|---|---|
| string | send | on |

decoded function name when an ABI is known

## `blockchain.contract.function.selector`

| Type | Spans | Default |
|---|---|---|
| string | send | on |

4-byte selector, e.g. `0xa9059cbb`

## `blockchain.contract.function.arguments`

| Type | Spans | Default |
|---|---|---|
| string | send | off (opt-in) |

decoded call arguments as a JSON array, e.g. `["0x2222...2222","1000000"]`: bigints as decimal strings, addresses per address mode, truncated after 4096 characters. Only own enumerable data properties are serialized; `toJSON()` and getters are never called; binary data (typed arrays, `ArrayBuffer`) as `0x` hex

## `blockchain.tx.status`

| Type | Spans | Default |
|---|---|---|
| string | confirm | on |

from chain data: `success` | `reverted` | `replaced`

## `blockchain.block.number`

| Type | Spans | Default |
|---|---|---|
| int | confirm | on |

inclusion block; for a user operation, the bundle transaction's; for a call batch, the highest among its receipts

## `blockchain.tx.gas.used`

| Type | Spans | Default |
|---|---|---|
| int | confirm | on |

gas used

## `blockchain.tx.effective_gas_price`

| Type | Spans | Default |
|---|---|---|
| string | confirm | on |

price per gas in the chain's fee unit (see the fee table below), decimal string; see the `fee` row for when it is omitted

## `blockchain.tx.l1_fee`

| Type | Spans | Default |
|---|---|---|
| string | confirm | on |

L1 data fee on OP-stack chains, in the chain's fee unit; see the `fee` row for when it is omitted

## `blockchain.tx.fee`

| Type | Spans | Default |
|---|---|---|
| string | confirm | on |

`gas.used × effective_gas_price + l1_fee`, in the chain's fee unit: wei of the native currency, or the token `fee_asset` names (see the fee table below); omitted if the gas price is unknown. The OP Stack operator fee (Isthmus and later) is not included: it is recorded apart as `operator_fee`. Fee attributes come from the sealed receipt, never a flashblocks preconfirmation, and are omitted if only a preconfirmation was seen (see [ADR 0024](https://github.com/selimaytac/hashspan/blob/@hashspan/core@1.1.0/docs/adr/0024-sealed-receipt-fees.md)). On the confirm span of a payment's settlement, the fee is the facilitator's, which sent the transaction

## `blockchain.tx.operator_fee`

| Type | Spans | Default |
|---|---|---|
| string | confirm | on |

OP Stack operator fee (Isthmus and later), wei, decimal string; not included in `blockchain.tx.fee`. Recorded only when the receipt carries `operatorFeeScalar` or `operatorFeeConstant`, which a node adds when the chain charges the fee; the viem adapter then reads it from the GasPriceOracle's `getOperatorFee(gasUsed)` at the receipt's block, with one `eth_call`. Like the other fee attributes, it comes from the sealed receipt only, and is omitted for a deposit transaction, which pays none

## `blockchain.tx.fee_asset`

| Type | Spans | Default |
|---|---|---|
| string | confirm | raw |

contract address of the token the fee was paid in, subject to address mode, as the chain reports it (a Celo fee currency, which for a 6-decimal token is its 18-decimal adapter contract; a Tempo fee token); absent when the fee is in the native currency. Recorded with the fee attributes, when `effective_gas_price` is. Taken from the receipt when it names one, else from the send: the viem adapter reads Celo's `feeCurrency` from the sending call, never from `sendRawTransaction`, and Tempo's `feeToken` only from a receipt of type `0x76`; a replacing transaction records its own, never the replaced one's ([ADR 0028](https://github.com/selimaytac/hashspan/blob/@hashspan/core@1.1.0/docs/adr/0028-fee-asset.md))

## `blockchain.tx.revert.reason`

| Type | Spans | Default |
|---|---|---|
| string | confirm | on |

decoded revert reason when available, also of a reverted user operation: the `Error(string)` message, `Panic(0x..)`, `ErrorName(arg, ...)` for custom errors with a known ABI, else the 4-byte error selector. See [ADR 0005](https://github.com/selimaytac/hashspan/blob/@hashspan/core@1.1.0/docs/adr/0005-revert-reason-replay.md)

## `blockchain.tx.replacement.hash`

| Type | Spans | Default |
|---|---|---|
| string | confirm | on |

on a `replaced` confirm span: hash of the mined transaction that replaced it

## `blockchain.tx.replacement.reason`

| Type | Spans | Default |
|---|---|---|
| string | confirm | on |

on a `replaced` confirm span: `repriced` | `cancelled` | `replaced`, as reported by the instrumented library; omitted when it reported none

## `blockchain.tx.wait.confirmations`

| Type | Spans | Default |
|---|---|---|
| int | confirm | on |

on a transaction's confirm span: the confirmations (blocks, counting the receipt's own) that the wait which ended the span asked for, as the library applies them: a viem wait's or a CDP network-scoped wait's `confirmations` when it is a positive safe integer; `1` when it is omitted, `0`, negative or `NaN`, as viem then waits for one, and for background confirmation and `watch()`; not recorded for any other value, nor when the wait took no count (sync actions, user operations, call batches). A count of blocks is not finality: on a rollup it counts the sequencer's blocks, and block times differ by chain, so read it with `blockchain.chain.id`. Span only, never a metric attribute (see one confirm span per transaction for which wait ends the span)
