Skip to content

Commit 028acec

Browse files
maxwolffThegaram
andauthored
fix return type in tx receipt for l1fee type (#254)
* edit marshalling override * goimports * not required * encode l1fee --------- Co-authored-by: Péter Garamvölgyi <[email protected]>
1 parent 49e755e commit 028acec

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

core/types/gen_receipt_json.go

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/types/receipt.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ type Receipt struct {
7575
ReturnValue []byte `json:"returnValue,omitempty"`
7676

7777
// Scroll rollup
78-
L1Fee *big.Int `json:"l1Fee,omitempty" gencodec:"required"`
78+
L1Fee *big.Int `json:"l1Fee,omitempty"`
7979
}
8080

8181
type receiptMarshaling struct {
@@ -86,6 +86,7 @@ type receiptMarshaling struct {
8686
GasUsed hexutil.Uint64
8787
BlockNumber *hexutil.Big
8888
TransactionIndex hexutil.Uint
89+
L1Fee *hexutil.Big
8990
}
9091

9192
// receiptRLP is the consensus encoding of a receipt.

internal/ethapi/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha
16691669
"logs": receipt.Logs,
16701670
"logsBloom": receipt.Bloom,
16711671
"type": hexutil.Uint(tx.Type()),
1672-
"l1Fee": receipt.L1Fee,
1672+
"l1Fee": hexutil.Uint64(receipt.L1Fee.Uint64()),
16731673
}
16741674
// Assign the effective gas price paid
16751675
if !s.b.ChainConfig().IsLondon(bigblock) {

0 commit comments

Comments
 (0)