Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions suave/backends/eth_backend_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
}