@receipts:tx.fee
Total fee paid for a transaction, in wei (gasUsed x effectiveGasPrice, plus the L1 data fee on OP-stack chains).
⚗️ Experimental — available at next.evmcrispr.com.
Returns: number
Syntax
Section titled “Syntax”@receipts:tx.fee(hash chain?)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
hash | bytes32 | Transaction hash |
[chain] | chain | Chain to look on (default: current chain) |
Examples
Section titled “Examples”# Read the total fee paid for a transactionset $fee @receipts:tx.fee(0x16df2e878e23ff261844fc9252f6c8bfcd4cb69f9f80895c6a2f01032b228e13)See Also
Section titled “See Also”- @receipts:tx.gasUsed — gas used by a transaction
- @receipts:tx — full transaction summary