reth
reth copied to clipboard
feat(payload): add support for stack of payload builders
trafficstars
Problem
We need a flexible way to combine and sequentially execute multiple payload builders of the same type, allowing for more complex and customizable payload building strategies. Fixes https://github.com/paradigmxyz/reth/issues/10438
Solution
Implement a new PayloadBuilderStack<L, R> that can hold and execute two builders of potentially different types in sequence, with the ability to nest these stacks for more complex arrangements.
Implementation Details
- Create
PayloadBuilderStack<L, R>with two generic type parameters for left and right builders - Allow for nested stacks, enabling complex arrangements like
Stack<Stack<A, B>, C>
Testing
- None