diff --git a/suave/backends/eth_backend_server.go b/suave/backends/eth_backend_server.go index 571f4a4eddce..330063db6549 100644 --- a/suave/backends/eth_backend_server.go +++ b/suave/backends/eth_backend_server.go @@ -56,8 +56,7 @@ func (e *EthBackendServer) BuildEthBlock(ctx context.Context, buildArgs *types.B return nil, err } - // TODO: we're not adding blobs, but this is not where you would do it anyways - return engine.BlockToExecutableData(block, profit, nil), nil + return engine.BlockToExecutableData(block, profit, getSidecars(block)), nil } func (e *EthBackendServer) BuildEthBlockFromBundles(ctx context.Context, buildArgs *types.BuildBlockArgs, bundles []types.SBundle) (*engine.ExecutionPayloadEnvelope, error) { @@ -80,10 +79,20 @@ func (e *EthBackendServer) BuildEthBlockFromBundles(ctx context.Context, buildAr return nil, err } - // TODO: we're not adding blobs, but this is not where you would do it anyways - return engine.BlockToExecutableData(block, profit, nil), nil + return engine.BlockToExecutableData(block, profit, getSidecars(block)), nil } func (e *EthBackendServer) Call(ctx context.Context, contractAddr common.Address, input []byte) ([]byte, error) { return e.b.Call(ctx, contractAddr, input) } + +func getSidecars(block *types.Block) []*types.BlobTxSidecar { + sidecars := []*types.BlobTxSidecar{} + for _, tx := range block.Transactions() { + sidecar := tx.BlobTxSidecar() + if sidecar != nil { + sidecars = append(sidecars, sidecar) + } + } + return sidecars +}