Provides a start command handler for rollkit which can be used by the cosmos-sdk apps
- Go version >= 1.21
- Ignite CLI >= v28.3.0
-
Create a cosmos-sdk app using ignite cli
ignite scaffold chain gm --address-prefix gm
-
Add cosmos-sdk-starter to your
gm
projectcd gm
go get github.com/rollkit/cosmos-sdk-starter
go mod tidy
-
Make sure to check that cosmos-sdk version is
v0.50.6+
and rollkit version isv0.13.1+
-
Navigate to
cmd/gmd/cmd/commands.go
under yourgm
project -
Add following imports
rollserv "github.com/rollkit/cosmos-sdk-starter/server" rollconf "github.com/rollkit/rollkit/config"
-
Edit
initRootCmd
function to replaceserver.AddCommands(rootCmd, app.DefaultNodeHome, newApp, appExport, addModuleInitFlags)
to
server.AddCommandsWithStartCmdOptions( rootCmd, app.DefaultNodeHome, newApp, appExport, server.StartCmdOptions{ AddFlags: rollconf.AddFlags, StartCommandHandler: rollserv.StartHandler[servertypes.Application], }, )
-
Build your
gm
chain usingignite chain build
-
Your
gm
app is now using Rollkit instead of Cometbft -
For running the
gm
chain using Rollkit, it is important to add the Rollkit sequencer togm
app'sgenesis.json
file. Follow instructions provided in the adding rollkit sequencer to genesis -
Finally lauch app by passing rollkit flags: e.g.,
gmd start --rollkit.aggregator --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr "0.0.0.0:36656" --minimum-gas-prices="0.025stake" --rollkit.da_address "http://localhost:7980"