Skip to content

Commit

Permalink
feat: make sure to support chains built w/ SDK '>= v0.46.0-alpha1' (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgooz authored May 16, 2022
1 parent 5fdb441 commit db74990
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [`v0.21.1`](https://github.com/ignite-hq/cli/releases/tag/v0.21.1)

### Features

- Add compatibility to run chains built with Cosmos-SDK `v0.46.0-alpha1` and above
- Scaffold chains now will have `auth` module enabled by default

### Fixes

- Fixed shell completion generation
- Make sure proto package names are valid when using simple app names

## [`v0.21.0`](https://github.com/ignite-hq/cli/releases/tag/v0.21.0)

### Features
Expand Down
9 changes: 9 additions & 0 deletions ignite/services/chain/plugin-stargate.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/pelletier/go-toml"

sdktypes "github.com/cosmos/cosmos-sdk/types"
"github.com/ignite-hq/cli/ignite/chainconfig"
"github.com/ignite-hq/cli/ignite/pkg/chaincmd"
chaincmdrunner "github.com/ignite-hq/cli/ignite/pkg/chaincmd/runner"
Expand Down Expand Up @@ -77,6 +78,13 @@ func (p *stargatePlugin) appTOML(homePath string, conf chainconfig.Config) error
config.Set("grpc.address", conf.Host.GRPC)
config.Set("grpc-web.address", conf.Host.GRPCWeb)

staked, err := sdktypes.ParseCoinNormalized(conf.Validator.Staked)
if err != nil {
return err
}
gas := sdktypes.NewInt64Coin(staked.Denom, 80000)
config.Set("minimum-gas-prices", gas.String())

file, err := os.OpenFile(path, os.O_RDWR|os.O_TRUNC, 0644)
if err != nil {
return err
Expand Down Expand Up @@ -105,6 +113,7 @@ func (p *stargatePlugin) configTOML(homePath string, conf chainconfig.Config) er
return fmt.Errorf("invalid p2p address format %s: %w", conf.Host.P2P, err)
}

config.Set("mode", "validator")
config.Set("rpc.cors_allowed_origins", []string{"*"})
config.Set("consensus.timeout_commit", "1s")
config.Set("consensus.timeout_propose", "1s")
Expand Down

0 comments on commit db74990

Please sign in to comment.