@@ -50,6 +50,7 @@ type txJSON struct {
5050 AccessList * AccessList `json:"accessList,omitempty"`
5151
5252 // Blob transaction fields:
53+ MaxFeePerDataGas * hexutil.Big `json:"maxFeePerDataGas,omitempty"`
5354 BlobVersionedHashes []common.Hash `json:"blobVersionedHashes,omitempty"`
5455 Blobs Blobs `json:"blobs,omitempty"`
5556 BlobKzgs BlobKzgs `json:"blobKzgs,omitempty"`
@@ -117,6 +118,7 @@ func (t *Transaction) MarshalJSON() ([]byte, error) {
117118 enc .V = (* hexutil .Big )(v )
118119 enc .R = (* hexutil .Big )(r )
119120 enc .S = (* hexutil .Big )(s )
121+ enc .MaxFeePerDataGas = (* hexutil .Big )(u256ToBig (& tx .Message .MaxFeePerDataGas ))
120122 enc .BlobVersionedHashes = tx .Message .BlobVersionedHashes
121123 if t .wrapData != nil {
122124 enc .Blobs = t .wrapData .blobs ()
@@ -347,6 +349,10 @@ func (t *Transaction) UnmarshalJSON(input []byte) error {
347349 return err
348350 }
349351 }
352+ itx .Message .MaxFeePerDataGas .SetFromBig ((* big .Int )(dec .MaxFeePerDataGas ))
353+ if dec .MaxFeePerDataGas == nil {
354+ return errors .New ("missing required field 'maxFeePerDataGas' for txdata" )
355+ }
350356 itx .Message .BlobVersionedHashes = dec .BlobVersionedHashes
351357 // A BlobTx may not contain data
352358 if len (dec .Blobs ) != 0 || len (dec .BlobKzgs ) != 0 {
0 commit comments