feat: Lane Options (#272)
* init * lint * update mock * cr * readme nit
This commit is contained in:
+13
-3
@@ -43,6 +43,7 @@ import (
|
||||
|
||||
"github.com/skip-mev/block-sdk/abci"
|
||||
"github.com/skip-mev/block-sdk/block"
|
||||
"github.com/skip-mev/block-sdk/block/base"
|
||||
"github.com/skip-mev/block-sdk/lanes/mev"
|
||||
auctionkeeper "github.com/skip-mev/block-sdk/x/auction/keeper"
|
||||
blocksdkkeeper "github.com/skip-mev/block-sdk/x/blocksdk/keeper"
|
||||
@@ -248,9 +249,18 @@ func New(
|
||||
app.App.SetAnteHandler(anteHandler)
|
||||
|
||||
// Set the ante handler on the lanes.
|
||||
mevLane.SetAnteHandler(anteHandler)
|
||||
freeLane.SetAnteHandler(anteHandler)
|
||||
defaultLane.SetAnteHandler(anteHandler)
|
||||
opt := []base.LaneOption{
|
||||
base.WithAnteHandler(anteHandler),
|
||||
}
|
||||
mevLane.WithOptions(
|
||||
opt...,
|
||||
)
|
||||
freeLane.WithOptions(
|
||||
opt...,
|
||||
)
|
||||
defaultLane.WithOptions(
|
||||
opt...,
|
||||
)
|
||||
|
||||
// Step 6: Create the proposal handler and set it on the app. Now the application
|
||||
// will build and verify proposals using the Block SDK!
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import (
|
||||
// we create three separate lanes - MEV, Free, and Default - and then return them.
|
||||
//
|
||||
// NOTE: Application Developers should closely replicate this function in their own application.
|
||||
func CreateLanes(app *TestApp) (*mevlane.MEVLane, *freelane.FreeLane, *defaultlane.DefaultLane) {
|
||||
func CreateLanes(app *TestApp) (*mevlane.MEVLane, *base.BaseLane, *base.BaseLane) {
|
||||
// 1. Create the signer extractor. This is used to extract the expected signers from
|
||||
// a transaction. Each lane can have a different signer extractor if needed.
|
||||
signerAdapter := signerextraction.NewDefaultAdapter()
|
||||
|
||||
Reference in New Issue
Block a user