Skip to content

Commit 3653ceb

Browse files
ethapi: Set post Ecotone receipt fields (ethereum-optimism#314)
1 parent ef178f2 commit 3653ceb

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

internal/ethapi/api.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,9 +1910,20 @@ func marshalReceipt(receipt *types.Receipt, blockHash common.Hash, blockNumber u
19101910
fields["l1GasPrice"] = (*hexutil.Big)(receipt.L1GasPrice)
19111911
fields["l1GasUsed"] = (*hexutil.Big)(receipt.L1GasUsed)
19121912
fields["l1Fee"] = (*hexutil.Big)(receipt.L1Fee)
1913-
if receipt.FeeScalar != nil { // removed in Ecotone
1913+
// Fields removed with Ecotone
1914+
if receipt.FeeScalar != nil {
19141915
fields["l1FeeScalar"] = receipt.FeeScalar.String()
19151916
}
1917+
// Fields added in Ecotone
1918+
if receipt.L1BlobBaseFee != nil {
1919+
fields["l1BlobBaseFee"] = (*hexutil.Big)(receipt.L1BlobBaseFee)
1920+
}
1921+
if receipt.L1BaseFeeScalar != nil {
1922+
fields["l1BaseFeeScalar"] = hexutil.Uint64(*receipt.L1BaseFeeScalar)
1923+
}
1924+
if receipt.L1BlobBaseFeeScalar != nil {
1925+
fields["l1BlobBaseFeeScalar"] = hexutil.Uint64(*receipt.L1BlobBaseFeeScalar)
1926+
}
19161927
}
19171928
if chainConfig.Optimism != nil && tx.IsDepositTx() && receipt.DepositNonce != nil {
19181929
fields["depositNonce"] = hexutil.Uint64(*receipt.DepositNonce)

0 commit comments

Comments
 (0)