Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Sep 3, 2024
1 parent 4038f8c commit 29dec86
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ node_modules
docs/.vuepress/dist
build/
*coverage.*
*.ign
7 changes: 5 additions & 2 deletions ignite/internal/plugin/testdata/execute_fail/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ module execute_fail

go 1.23

replace (
github.com/ignite/cli/v29 => ../../../../..
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-alpha.1.0.20240830170625-e3c86d1537c9
)

require (
github.com/hashicorp/go-plugin v1.6.0
github.com/ignite/cli/v29 v29.0.0
)

replace github.com/ignite/cli/v29 => ../../../../..

require (
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
Expand Down
7 changes: 5 additions & 2 deletions ignite/internal/plugin/testdata/execute_ok/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ module execute_ok

go 1.23

replace (
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-alpha.1.0.20240830170625-e3c86d1537c9
github.com/ignite/cli/v29 => ../../../../..
)

require (
github.com/hashicorp/go-plugin v1.6.0
github.com/ignite/cli/v29 v29.0.0
)

replace github.com/ignite/cli/v29 => ../../../../..

require (
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
Expand Down
5 changes: 4 additions & 1 deletion ignite/internal/tools/gen-config-doc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ module github.com/ignite/cli/ignite/internal/tools/gen-config-doc

go 1.23

replace github.com/ignite/cli/v29 => ../../../../
replace (
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-alpha.1.0.20240830170625-e3c86d1537c9
github.com/ignite/cli/v29 => ../../../../
)

require (
github.com/gobuffalo/genny/v2 v2.1.0
Expand Down
5 changes: 4 additions & 1 deletion ignite/internal/tools/gen-mig-diffs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ module github.com/ignite/cli/ignite/internal/tools/gen-mig-diffs

go 1.23

replace github.com/ignite/cli/v29 => ../../../../
replace (
github.com/ignite/cli/v29 => ../../../../
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-alpha.1.0.20240830170625-e3c86d1537c9
)

require (
github.com/Masterminds/semver/v3 v3.2.1
Expand Down
1 change: 1 addition & 0 deletions ignite/pkg/cosmosclient/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

banktypes "cosmossdk.io/x/bank/types"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/query"

Expand Down
1 change: 1 addition & 0 deletions ignite/pkg/cosmosclient/cosmosclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
authtypes "cosmossdk.io/x/auth/types"
banktypes "cosmossdk.io/x/bank/types"
staking "cosmossdk.io/x/staking/types"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/ibc/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func codecModify(replacer placeholder.Replacer, opts *PacketOptions) genny.RunFn
content := replacer.ReplaceOnce(f.String(), module.Placeholder, replacement)

// Register the module packet interface
templateInterface := `registry.RegisterImplementations((*sdk.Msg)(nil),
templateInterface := `registrar.RegisterImplementations((*sdk.Msg)(nil),
&MsgSend%[2]v{},
)
%[1]v`
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func typesCodecModify(replacer placeholder.Replacer, opts *Options) genny.RunFn
replacementImport := `sdk "github.com/cosmos/cosmos-sdk/types"`
content := replacer.ReplaceOnce(f.String(), Placeholder, replacementImport)

templateRegisterImplementations := `registry.RegisterImplementations((*sdk.Msg)(nil),
templateRegisterImplementations := `registrar.RegisterImplementations((*sdk.Msg)(nil),
&Msg%[2]v{},
)
%[1]v`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"cosmossdk.io/core/address"
"cosmossdk.io/core/appmodule"
"cosmossdk.io/core/store"
"cosmossdk.io/core/registry"
"cosmossdk.io/depinject"
"cosmossdk.io/depinject/appconfig"
"cosmossdk.io/log"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "cosmossdk.io/x/auth/types"
govtypes "cosmossdk.io/x/gov/types"
Expand Down Expand Up @@ -61,13 +61,9 @@ func (AppModuleBasic) Name() string {
return types.ModuleName
}

// RegisterLegacyAminoCodec registers the amino codec for the module, which is used
// to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore.
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {}

// RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message.
func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {
types.RegisterInterfaces(reg)
func (a AppModuleBasic) RegisterInterfaces(registrar registry.InterfaceRegistrar) {
types.RegisterInterfaces(registrar)
}

// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package types

import (
"cosmossdk.io/core/registry"

<%= if (isIBC) { %>"github.com/cosmos/cosmos-sdk/codec"<% } %>
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -9,13 +11,13 @@ import (
// this line is used by starport scaffolding # 1
)

func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
func RegisterInterfaces(registrar registry.InterfaceRegistrar) {
// this line is used by starport scaffolding # 3

registry.RegisterImplementations((*sdk.Msg)(nil),
registrar.RegisterImplementations((*sdk.Msg)(nil),
&MsgUpdateParams{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc)
}

<%= if (isIBC) { %>
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/typed/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func typesCodecModify(replacer placeholder.Replacer, opts *typed.Options) genny.
content := replacer.ReplaceOnce(f.String(), typed.Placeholder, replacementImport)

// Interface
templateInterface := `registry.RegisterImplementations((*sdk.Msg)(nil),
templateInterface := `registrar.RegisterImplementations((*sdk.Msg)(nil),
&MsgCreate%[2]v{},
&MsgUpdate%[2]v{},
&MsgDelete%[2]v{},
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/typed/map/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ func typesCodecModify(replacer placeholder.Replacer, opts *typed.Options) genny.
content = replacer.ReplaceOnce(content, typed.Placeholder, replacementImport)

// Interface
templateInterface := `registry.RegisterImplementations((*sdk.Msg)(nil),
templateInterface := `registrar.RegisterImplementations((*sdk.Msg)(nil),
&MsgCreate%[2]v{},
&MsgUpdate%[2]v{},
&MsgDelete%[2]v{},
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/typed/singleton/singleton.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ func typesCodecModify(replacer placeholder.Replacer, opts *typed.Options) genny.
content = replacer.ReplaceOnce(content, typed.Placeholder, replacementImport)

// Interface
templateInterface := `registry.RegisterImplementations((*sdk.Msg)(nil),
templateInterface := `registrar.RegisterImplementations((*sdk.Msg)(nil),
&MsgCreate%[2]v{},
&MsgUpdate%[2]v{},
&MsgDelete%[2]v{},
Expand Down
23 changes: 13 additions & 10 deletions integration/plugin/testdata/example-plugin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ module example-plugin

go 1.23

replace (
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-alpha.1.0.20240830170625-e3c86d1537c9
github.com/ignite/cli/v29 => ../../../../
)

require (
github.com/hashicorp/go-plugin v1.6.0
github.com/hashicorp/go-plugin v1.6.1
github.com/ignite/cli/v29 v29.0.0
)

Expand All @@ -20,7 +25,7 @@ require (
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-sdk v0.50.9 // indirect
github.com/cosmos/cosmos-sdk v0.52.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.17.0 // indirect
Expand Down Expand Up @@ -49,7 +54,7 @@ require (
github.com/gorilla/css v1.0.0 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
Expand All @@ -63,7 +68,7 @@ require (
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.1 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/otiai10/copy v1.14.0 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
Expand All @@ -78,21 +83,19 @@ require (
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.etcd.io/bbolt v1.3.9 // indirect
go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/tools v0.24.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect
google.golang.org/grpc v1.66.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/ignite/cli/v29 => ../../../../

0 comments on commit 29dec86

Please sign in to comment.