Skip to content

Commit

Permalink
Merge branch 'main' into feat/auto-migdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani authored Mar 19, 2024
2 parents 72d5eef + 75331b0 commit 770d57b
Show file tree
Hide file tree
Showing 21 changed files with 36 additions and 31 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Features

- [#4019](https://github.com/ignite/cli/pull/4019) Add `skip-proto` flag to `s chain` command
- [#3977](https://github.com/ignite/cli/pull/3977) Add `chain lint` command to lint the chain's codebase using `golangci-lint`
- [#3770](https://github.com/ignite/cli/pull/3770) Add `scaffold configs` and `scaffold params` commands
- [#3985](https://github.com/ignite/cli/pull/3985) Make some `cmd` pkg functions public
Expand All @@ -14,6 +15,7 @@

### Changes

- [#4031](https://github.com/ignite/cli/pull/4031) Bump `cli-plugin-network` to `v0.2.2` due to dependencies issue.
- [#4013](https://github.com/ignite/cli/pull/4013) Bump `cosmos-sdk` to `v0.50.5`
- [#3993](https://github.com/ignite/cli/pull/3993) Oracle scaffolding was deprecated and has been removed
- [#3959](https://github.com/ignite/cli/pull/3959) Remove app name prefix from the `.gitignore` file
Expand All @@ -23,9 +25,11 @@
- [#3983](https://github.com/ignite/cli/pull/3983) Bump `cosmos-sdk` to `v0.50.4` and `ibc-go` to `v8.1.0`
- [#4002](https://github.com/ignite/cli/pull/4002) Bump buf build
- [#4008](https://github.com/ignite/cli/pull/4008) Rename `pkg/yaml` to `pkg/xyaml`
- [#4035](https://github.com/ignite/cli/pull/4035) Bump `cometbft` to `v0.38.6` and `ibc-go/v8` to `v8.1.1`

### Fixes

- [#4021](https://github.com/ignite/cli/pull/4021) Set correct custom signer in `s list --signer <signer>`
- [#3995](https://github.com/ignite/cli/pull/3995) Fix interface check for ibc modules
- [#3953](https://github.com/ignite/cli/pull/3953) Fix apps `Stdout` is redirected to `Stderr`
- [#3863](https://github.com/ignite/cli/pull/3963) Fix breaking issue for app client API when reading app chain info
Expand Down
6 changes: 3 additions & 3 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4093,9 +4093,9 @@ flux@^4.0.1:
fbjs "^3.0.1"

follow-redirects@^1.0.0, follow-redirects@^1.14.7:
version "1.15.4"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf"
integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==
version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==

fork-ts-checker-webpack-plugin@^6.5.0:
version "6.5.3"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ require (
github.com/charmbracelet/glow v1.4.1
github.com/charmbracelet/lipgloss v0.6.0
github.com/cockroachdb/errors v1.11.1
github.com/cometbft/cometbft v0.38.5
github.com/cometbft/cometbft v0.38.6
github.com/cosmos/cosmos-sdk v0.50.5
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/gogoproto v1.4.11
github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/v8 v8.1.0
github.com/cosmos/ibc-go/v8 v8.1.1
github.com/emicklei/proto v1.12.2
github.com/emicklei/proto-contrib v0.15.0
github.com/go-delve/delve v1.21.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU=
github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg=
github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk=
github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw=
github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M=
github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U=
github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw=
Expand Down Expand Up @@ -375,8 +375,8 @@ github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw=
github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY=
github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE=
github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco=
github.com/cosmos/ibc-go/v8 v8.1.0 h1:pf1106wl0Cf+p1+FjXzV6odlS9DnqVunPVWCH1Uz+lQ=
github.com/cosmos/ibc-go/v8 v8.1.0/go.mod h1:o1ipS95xpdjqNcB8Drq0eI3Sn4FRLigjll42ec1ECuU=
github.com/cosmos/ibc-go/v8 v8.1.1 h1:N2+GA86yACcXnKWCKtqdbCwP0/Eo8pH79+6e7TicULU=
github.com/cosmos/ibc-go/v8 v8.1.1/go.mod h1:o1ipS95xpdjqNcB8Drq0eI3Sn4FRLigjll42ec1ECuU=
github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM=
github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0=
github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
Expand Down
2 changes: 1 addition & 1 deletion ignite/cmd/plugin_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type defaultPlugin struct {
}

const (
PluginNetworkVersion = "v0.2.1"
PluginNetworkVersion = "v0.2.2"
PluginNetworkPath = "github.com/ignite/cli-plugin-network@" + PluginNetworkVersion
)

Expand Down
3 changes: 3 additions & 0 deletions ignite/cmd/scaffold_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ about Cosmos SDK on https://docs.cosmos.network
c.Flags().StringSlice(flagParams, []string{}, "add default module parameters")
c.Flags().StringSlice(flagModuleConfigs, []string{}, "add module configs")
c.Flags().Bool(flagSkipGit, false, "skip Git repository initialization")
c.Flags().Bool(flagSkipProto, false, "skip proto generation")
c.Flags().Bool(flagMinimal, false, "create a minimal blockchain (with the minimum required Cosmos SDK modules)")
c.Flags().Bool(flagIsConsumer, false, "scafffold an ICS consumer chain")
// Cannot have both minimal and consumer flag
Expand All @@ -106,6 +107,7 @@ func scaffoldChainHandler(cmd *cobra.Command, args []string) error {
isConsumer, _ = cmd.Flags().GetBool(flagIsConsumer)
params, _ = cmd.Flags().GetStringSlice(flagParams)
moduleConfigs, _ = cmd.Flags().GetStringSlice(flagModuleConfigs)
skipProto, _ = cmd.Flags().GetBool(flagSkipProto)
)

if noDefaultModule {
Expand All @@ -130,6 +132,7 @@ func scaffoldChainHandler(cmd *cobra.Command, args []string) error {
addressPrefix,
noDefaultModule,
skipGit,
skipProto,
minimal,
isConsumer,
params,
Expand Down
2 changes: 1 addition & 1 deletion ignite/services/scaffolder/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s Scaffolder) CreateConfigs(
return sm, err
}

return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath)
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath, false)
}

// checkConfigCreated checks if the config has been already created.
Expand Down
5 changes: 2 additions & 3 deletions ignite/services/scaffolder/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func Init(
cacheStorage cache.Storage,
tracer *placeholder.Tracer,
root, name, addressPrefix string,
noDefaultModule, skipGit, minimal, isConsumerChain bool,
noDefaultModule, skipGit, skipProto, minimal, isConsumerChain bool,
params, moduleConfigs []string,
) (path string, err error) {
pathInfo, err := gomodulepath.Parse(name)
Expand Down Expand Up @@ -61,8 +61,7 @@ func Init(
return "", err
}

err = finish(ctx, cacheStorage, path, pathInfo.RawPath)
if err != nil {
if err = finish(ctx, cacheStorage, path, pathInfo.RawPath, skipProto); err != nil {
return "", err
}

Expand Down
2 changes: 1 addition & 1 deletion ignite/services/scaffolder/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (s Scaffolder) AddMessage(
if err != nil {
return sm, err
}
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath)
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath, false)
}

// checkForbiddenMessageField returns true if the name is forbidden as a message name.
Expand Down
2 changes: 1 addition & 1 deletion ignite/services/scaffolder/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (s Scaffolder) CreateModule(
return sm, runErr
}

return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath)
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath, false)
}

// moduleExists checks if the module exists in the app.
Expand Down
2 changes: 1 addition & 1 deletion ignite/services/scaffolder/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (s Scaffolder) AddPacket(
if err != nil {
return sm, err
}
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath)
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath, false)
}

// isIBCModule returns true if the provided module implements the IBC module interface
Expand Down
2 changes: 1 addition & 1 deletion ignite/services/scaffolder/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (s Scaffolder) CreateParams(
return sm, err
}

return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath)
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath, false)
}

// checkParamCreated checks if the parameter has been already created.
Expand Down
2 changes: 1 addition & 1 deletion ignite/services/scaffolder/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ func (s Scaffolder) AddQuery(
if err != nil {
return sm, err
}
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath)
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath, false)
}
9 changes: 5 additions & 4 deletions ignite/services/scaffolder/scaffolder.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ func New(appPath string) (Scaffolder, error) {
return s, nil
}

func finish(ctx context.Context, cacheStorage cache.Storage, path, gomodPath string) error {
err := protoc(ctx, cacheStorage, path, gomodPath)
if err != nil {
return err
func finish(ctx context.Context, cacheStorage cache.Storage, path, gomodPath string, skipProto bool) error {
if !skipProto {
if err := protoc(ctx, cacheStorage, path, gomodPath); err != nil {
return err
}
}

if err := gocmd.Fmt(ctx, path); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion ignite/services/scaffolder/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (s Scaffolder) AddType(
return sm, err
}

return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath)
return sm, finish(ctx, cacheStorage, opts.AppPath, s.modpath.RawPath, false)
}

// checkForbiddenTypeIndex returns true if the name is forbidden as a index name.
Expand Down
1 change: 0 additions & 1 deletion ignite/templates/app/files-consumer/app/app.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/ante"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper"
ibcconsumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"
// this line is used by starport scaffolding # stargate/app/moduleImport

"<%= ModulePath %>/docs"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import (
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
"google.golang.org/protobuf/types/known/durationpb"
ibcconsumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"
// this line is used by starport scaffolding # stargate/app/moduleImport
)

var (
Expand Down
1 change: 0 additions & 1 deletion ignite/templates/app/files-minimal/app/app_config.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ var (
// NOTE: Capability module must occur first so that it can initialize any capabilities
// so that other modules that want to create or claim capabilities afterwards in InitChain
// can do so safely.

genesisModuleOrder = []string{
// cosmos-sdk modules
authtypes.ModuleName,
Expand Down
1 change: 1 addition & 0 deletions ignite/templates/app/files/app/ibc.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"cosmossdk.io/core/appmodule"
storetypes "cosmossdk.io/store/types"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
Expand Down
4 changes: 2 additions & 2 deletions ignite/templates/app/files/go.mod.plush
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ require (
github.com/cosmos/interchain-security/v3 v3.2.0-consumer-rc0.0.20231123140529-1819e73f6197
<% } %>
github.com/bufbuild/buf v1.30.0
github.com/cometbft/cometbft v0.38.5
github.com/cometbft/cometbft v0.38.6
github.com/cosmos/cosmos-db v1.0.2
github.com/cosmos/cosmos-proto v1.0.0-beta.4
github.com/cosmos/cosmos-sdk v0.50.5
github.com/cosmos/gogoproto v1.4.11
github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/v8 v8.1.0
github.com/cosmos/ibc-go/v8 v8.1.1
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (k msgServer) Update<%= TypeName.UpperCamel %>(goCtx context.Context, msg
}

// Checks if the msg <%= MsgSigner.LowerCamel %> is the same as the current owner
if msg.<%= MsgSigner.UpperCamel %> != val.Creator {
if msg.<%= MsgSigner.UpperCamel %> != val.<%= MsgSigner.UpperCamel %> {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "incorrect owner")
}

Expand All @@ -64,7 +64,7 @@ func (k msgServer) Delete<%= TypeName.UpperCamel %>(goCtx context.Context, msg
}

// Checks if the msg <%= MsgSigner.LowerCamel %> is the same as the current owner
if msg.<%= MsgSigner.UpperCamel %> != val.Creator {
if msg.<%= MsgSigner.UpperCamel %> != val.<%= MsgSigner.UpperCamel %> {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "incorrect owner")
}

Expand Down

0 comments on commit 770d57b

Please sign in to comment.