Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gupadhyaya authored Apr 23, 2024
1 parent f924615 commit 0eac06d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
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

0 comments on commit 0eac06d

Please sign in to comment.