diff --git a/ignite/templates/ibc/packet.go b/ignite/templates/ibc/packet.go index 0ff4194774..ffa405df8d 100644 --- a/ignite/templates/ibc/packet.go +++ b/ignite/templates/ibc/packet.go @@ -256,8 +256,8 @@ func protoModify(opts *PacketOptions) genny.RunFn { protoImports = append(protoImports, protoutil.NewImport(imp)) } for _, f := range append(opts.Fields.Custom(), opts.AckFields.Custom()...) { - protopath := opts.ProtoFile(fmt.Sprintf("%v.proto", f)) - protoImports = append(protoImports, protoutil.NewImport(protopath)) + protoPath := fmt.Sprintf("%[1]v/%[2]v/%[3]v/%[4]v.proto", opts.AppName, opts.ModuleName, opts.ProtoVer, f) + protoImports = append(protoImports, protoutil.NewImport(protoPath)) } if err := protoutil.AddImports(protoFile, true, protoImports...); err != nil { return errors.Errorf("failed while adding imports to %s: %w", path, err) @@ -349,7 +349,7 @@ func protoTxModify(opts *PacketOptions) genny.RunFn { protoImports = append(protoImports, protoutil.NewImport(imp)) } for _, f := range opts.Fields.Custom() { - protopath := opts.ProtoFile(fmt.Sprintf("%v.proto", f)) + protopath := fmt.Sprintf("%[1]v/%[2]v/%[3]v/%[4]v.proto", opts.AppName, opts.ModuleName, opts.ProtoVer, f) protoImports = append(protoImports, protoutil.NewImport(protopath)) } if err := protoutil.AddImports(protoFile, true, protoImports...); err != nil { diff --git a/ignite/templates/message/message.go b/ignite/templates/message/message.go index 6f3f48a56f..fae97f52a9 100644 --- a/ignite/templates/message/message.go +++ b/ignite/templates/message/message.go @@ -157,7 +157,7 @@ func protoTxMessageModify(opts *Options) genny.RunFn { protoImports = append(protoImports, protoutil.NewImport(imp)) } for _, f := range append(opts.ResFields.Custom(), opts.Fields.Custom()...) { - protoPath := fmt.Sprintf("%[1]v/%[2]v/%[3]v.proto", opts.AppName, opts.ModuleName, f) + protoPath := fmt.Sprintf("%[1]v/%[2]v/%[3]v/%[4]v.proto", opts.AppName, opts.ModuleName, opts.ProtoVer, f) protoImports = append(protoImports, protoutil.NewImport(protoPath)) } if err = protoutil.AddImports(protoFile, true, protoImports...); err != nil { diff --git a/ignite/templates/query/query.go b/ignite/templates/query/query.go index 8ed2471fa4..35bcd20d96 100644 --- a/ignite/templates/query/query.go +++ b/ignite/templates/query/query.go @@ -139,8 +139,8 @@ func protoQueryModify(opts *Options) genny.RunFn { protoImports = append(protoImports, protoutil.NewImport(imp)) } for _, f := range append(opts.ResFields.Custom(), opts.ReqFields.Custom()...) { - protopath := opts.ProtoFile(fmt.Sprintf("%v.proto", f)) - protoImports = append(protoImports, protoutil.NewImport(protopath)) + protoPath := fmt.Sprintf("%[1]v/%[2]v/%[3]v/%[4]v.proto", opts.AppName, opts.ModuleName, opts.ProtoVer, f) + protoImports = append(protoImports, protoutil.NewImport(protoPath)) } if err = protoutil.AddImports(protoFile, true, protoImports...); err != nil { return errors.Errorf("failed to add imports to %s: %w", path, err) diff --git a/ignite/templates/typed/list/list.go b/ignite/templates/typed/list/list.go index 039fa2f254..a176224ca3 100644 --- a/ignite/templates/typed/list/list.go +++ b/ignite/templates/typed/list/list.go @@ -134,7 +134,7 @@ func protoTxModify(opts *typed.Options) genny.RunFn { protoImports = append(protoImports, protoutil.NewImport(imp)) } for _, f := range opts.Fields.Custom() { - protoPath := opts.ProtoFile(fmt.Sprintf("%v.proto", f)) + protoPath := fmt.Sprintf("%[1]v/%[2]v/%[3]v/%[4]v.proto", opts.AppName, opts.ModuleName, opts.ProtoVer, f) protoImports = append(protoImports, protoutil.NewImport(protoPath)) } // we already know an import exists, pass false for fallback. diff --git a/ignite/templates/typed/map/map.go b/ignite/templates/typed/map/map.go index 51d7914942..f11175b955 100644 --- a/ignite/templates/typed/map/map.go +++ b/ignite/templates/typed/map/map.go @@ -224,7 +224,7 @@ func protoRPCModify(opts *typed.Options) genny.RunFn { protoImports = append(protoImports, protoutil.NewImport(imp)) } for _, f := range opts.Fields.Custom() { - protoPath := opts.ProtoFile(fmt.Sprintf("%v.proto", f)) + protoPath := fmt.Sprintf("%[1]v/%[2]v/%[3]v/%[4]v.proto", opts.AppName, opts.ModuleName, opts.ProtoVer, f) protoImports = append(protoImports, protoutil.NewImport(protoPath)) } // we already know an import exists, pass false for fallback. @@ -597,7 +597,7 @@ func protoTxModify(opts *typed.Options) genny.RunFn { protoImports = append(protoImports, protoutil.NewImport(imp)) } for _, f := range opts.Fields.Custom() { - protoPath := opts.ProtoFile(fmt.Sprintf("%v.proto", f)) + protoPath := fmt.Sprintf("%[1]v/%[2]v/%[3]v/%[4]v.proto", opts.AppName, opts.ModuleName, opts.ProtoVer, f) protoImports = append(protoImports, protoutil.NewImport(protoPath)) } // we already know an import exists, pass false for fallback. diff --git a/ignite/templates/typed/singleton/singleton.go b/ignite/templates/typed/singleton/singleton.go index bffeba0251..11601ed959 100644 --- a/ignite/templates/typed/singleton/singleton.go +++ b/ignite/templates/typed/singleton/singleton.go @@ -448,7 +448,7 @@ func protoTxModify(opts *typed.Options) genny.RunFn { protoImports = append(protoImports, protoutil.NewImport(imp)) } for _, f := range opts.Fields.Custom() { - protoPath := opts.ProtoFile(fmt.Sprintf("%v.proto", f)) + protoPath := fmt.Sprintf("%[1]v/%[2]v/%[3]v/%[4]v.proto", opts.AppName, opts.ModuleName, opts.ProtoVer, f) protoImports = append(protoImports, protoutil.NewImport(protoPath)) } // we already know an import exists, pass false for fallback.