Skip to content

Commit

Permalink
fix json serialisation for batch
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed Nov 21, 2023
1 parent 4321483 commit 4116e68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go/common/headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"math/big"
"sync"

"github.com/ethereum/go-ethereum/common/hexutil"

"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp"

Expand Down Expand Up @@ -58,7 +60,7 @@ func (b *BatchHeader) MarshalJSON() ([]byte, error) {
Nonce *types.BlockNonce `json:"nonce"`

// BaseFee was added by EIP-1559 and is ignored in legacy headers.
BaseFee *big.Int `json:"baseFeePerGas"`
BaseFee *hexutil.Big `json:"baseFeePerGas"`
}{
(*Alias)(b),
b.Hash(),
Expand All @@ -67,7 +69,7 @@ func (b *BatchHeader) MarshalJSON() ([]byte, error) {
nil,
nil,
nil,
b.BaseFee,
(*hexutil.Big)(b.BaseFee),
})
}

Expand Down

0 comments on commit 4116e68

Please sign in to comment.