-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f924615
commit 0eac06d
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,40 @@ | ||
# cosmos-sdk-starter | ||
Provides a start command handler for rollkit which can be used by the cosmos-sdk apps | ||
|
||
## Usage | ||
|
||
### Requirements | ||
* Go version >= 1.21 | ||
* Ignite CLI >= v28.3.0 | ||
|
||
### Steps | ||
* Create a cosmos-sdk app using ignite cli `ignite scaffold chain gm --address-prefix gm` | ||
* Add cosmos-sdk-starter to your `gm` project | ||
* `cd 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 is `v0.13.1+` | ||
* Navigate to `cmd/gmd/cmd/commands.go` under your `gm` project | ||
* Add following imports | ||
``` | ||
rollserv "github.com/rollkit/cosmos-sdk-starter/server" | ||
rollconf "github.com/rollkit/rollkit/config" | ||
``` | ||
* Edit `initRootCmd` function to replace | ||
``` | ||
server.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 using `ignite chain build` | ||
* Your `gm` app is now using Rollkit instead of Cometbft |