|
|
@ -18,11 +18,13 @@ func (e ExecutionPayloadEnvelope) MarshalJSON() ([]byte, error) { |
|
|
|
ExecutionPayload *ExecutableData `json:"executionPayload" gencodec:"required"` |
|
|
|
ExecutionPayload *ExecutableData `json:"executionPayload" gencodec:"required"` |
|
|
|
BlockValue *hexutil.Big `json:"blockValue" gencodec:"required"` |
|
|
|
BlockValue *hexutil.Big `json:"blockValue" gencodec:"required"` |
|
|
|
BlobsBundle *BlobsBundleV1 `json:"blobsBundle"` |
|
|
|
BlobsBundle *BlobsBundleV1 `json:"blobsBundle"` |
|
|
|
|
|
|
|
Override bool `json:"shouldOverrideBuilder"` |
|
|
|
} |
|
|
|
} |
|
|
|
var enc ExecutionPayloadEnvelope |
|
|
|
var enc ExecutionPayloadEnvelope |
|
|
|
enc.ExecutionPayload = e.ExecutionPayload |
|
|
|
enc.ExecutionPayload = e.ExecutionPayload |
|
|
|
enc.BlockValue = (*hexutil.Big)(e.BlockValue) |
|
|
|
enc.BlockValue = (*hexutil.Big)(e.BlockValue) |
|
|
|
enc.BlobsBundle = e.BlobsBundle |
|
|
|
enc.BlobsBundle = e.BlobsBundle |
|
|
|
|
|
|
|
enc.Override = e.Override |
|
|
|
return json.Marshal(&enc) |
|
|
|
return json.Marshal(&enc) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -32,6 +34,7 @@ func (e *ExecutionPayloadEnvelope) UnmarshalJSON(input []byte) error { |
|
|
|
ExecutionPayload *ExecutableData `json:"executionPayload" gencodec:"required"` |
|
|
|
ExecutionPayload *ExecutableData `json:"executionPayload" gencodec:"required"` |
|
|
|
BlockValue *hexutil.Big `json:"blockValue" gencodec:"required"` |
|
|
|
BlockValue *hexutil.Big `json:"blockValue" gencodec:"required"` |
|
|
|
BlobsBundle *BlobsBundleV1 `json:"blobsBundle"` |
|
|
|
BlobsBundle *BlobsBundleV1 `json:"blobsBundle"` |
|
|
|
|
|
|
|
Override *bool `json:"shouldOverrideBuilder"` |
|
|
|
} |
|
|
|
} |
|
|
|
var dec ExecutionPayloadEnvelope |
|
|
|
var dec ExecutionPayloadEnvelope |
|
|
|
if err := json.Unmarshal(input, &dec); err != nil { |
|
|
|
if err := json.Unmarshal(input, &dec); err != nil { |
|
|
@ -48,5 +51,8 @@ func (e *ExecutionPayloadEnvelope) UnmarshalJSON(input []byte) error { |
|
|
|
if dec.BlobsBundle != nil { |
|
|
|
if dec.BlobsBundle != nil { |
|
|
|
e.BlobsBundle = dec.BlobsBundle |
|
|
|
e.BlobsBundle = dec.BlobsBundle |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if dec.Override != nil { |
|
|
|
|
|
|
|
e.Override = *dec.Override |
|
|
|
|
|
|
|
} |
|
|
|
return nil |
|
|
|
return nil |
|
|
|
} |
|
|
|
} |
|
|
|