diff --git a/cmd/spawn/main.go b/cmd/spawn/main.go index b78effc7..5b245707 100644 --- a/cmd/spawn/main.go +++ b/cmd/spawn/main.go @@ -32,6 +32,10 @@ var ( } ) +func NewRootCmd() *cobra.Command { + return rootCmd +} + func main() { outOfDateChecker() diff --git a/cmd/spawn/module.go b/cmd/spawn/module.go index b3d53663..afab81c2 100644 --- a/cmd/spawn/module.go +++ b/cmd/spawn/module.go @@ -19,16 +19,41 @@ import ( const ( FlagIsIBCMiddleware = "ibc-middleware" + FlagIsIBCModule = "ibc-module" ) type features struct { ibcMiddleware bool + ibcModule bool +} + +func (f features) validate() error { + if f.ibcMiddleware && f.ibcModule { + return fmt.Errorf("cannot set both IBC Middleware and IBC Module") + } + + return nil +} + +func (f features) getModuleType() string { + if f.ibcMiddleware { + return "ibcmiddleware" + } else if f.ibcModule { + return "ibcmodule" + } + + return "example" +} +func (f features) isIBC() bool { + return f.ibcMiddleware || f.ibcModule } func normalizeModuleFlags(f *pflag.FlagSet, name string) pflag.NormalizedName { switch name { case "ibcmiddleware", "middleware": name = FlagIsIBCMiddleware + case "ibcmodule", "ibc": + name = FlagIsIBCModule } return pflag.NormalizedName(name) @@ -64,7 +89,7 @@ func NewCmd() *cobra.Command { // breaks proto-gen regex searches if strings.Contains(extName, "module") { - logger.Error("Module names cannot start with 'module'") + logger.Error("Module names cannot contain 'module'") return } @@ -78,7 +103,7 @@ func NewCmd() *cobra.Command { cwd, err := os.Getwd() if err != nil { - logger.Error("Error getting current working directory", err) + logger.Error("Error getting current working directory", "err", err) return } if _, err := os.Stat(path.Join(cwd, "x", extName)); err == nil { @@ -88,29 +113,41 @@ func NewCmd() *cobra.Command { isIBCMiddleware, err := cmd.Flags().GetBool(FlagIsIBCMiddleware) if err != nil { - logger.Error("Error getting IBC Middleware flag", err) + logger.Error("Error getting IBC Middleware flag", "err", err) + return + } + + isIBCModule, err := cmd.Flags().GetBool(FlagIsIBCModule) + if err != nil { + logger.Error("Error getting IBC Module flag", "err", err) return } feats := &features{ ibcMiddleware: isIBCMiddleware, + ibcModule: isIBCModule, + } + + if err := feats.validate(); err != nil { + logger.Error("Error validating module flags", "err", err) + return } // Setup Proto files to match the new x/ cosmos module name & go.mod module namespace (i.e. github org). if err := SetupModuleProtoBase(GetLogger(), extName, feats); err != nil { - logger.Error("Error setting up proto for module", err) + logger.Error("Error setting up proto for module", "err", err) return } // sets up the files in x/ if err := SetupModuleExtensionFiles(GetLogger(), extName, feats); err != nil { - logger.Error("Error setting up x/ module files", err) + logger.Error("Error setting up x/ module files", "err", err) return } // Import the files to app.go if err := AddModuleToAppGo(GetLogger(), extName, feats); err != nil { - logger.Error("Error adding new x/ module to app.go", err) + logger.Error("Error adding new x/ module to app.go", "err", err) return } @@ -121,7 +158,8 @@ func NewCmd() *cobra.Command { }, } - cmd.Flags().Bool(FlagIsIBCMiddleware, false, "Set the module as an IBC Middleware module") + cmd.Flags().Bool(FlagIsIBCMiddleware, false, "Set the module as an IBC Middleware") + cmd.Flags().Bool(FlagIsIBCModule, false, "Set the module as an IBC Module") cmd.Flags().SetNormalizeFunc(normalizeModuleFlags) return cmd @@ -145,10 +183,7 @@ func SetupModuleProtoBase(logger *slog.Logger, extName string, feats *features) goModName := spawn.ReadCurrentGoModuleName(path.Join(cwd, "go.mod")) protoNamespace := convertGoModuleNameToProtoNamespace(goModName) - moduleName := "example" - if feats.ibcMiddleware { - moduleName = "ibcmiddleware" - } + moduleName := feats.getModuleType() logger.Debug("proto namespace", "goModName", goModName, "protoNamespace", protoNamespace, "moduleName", moduleName) @@ -164,11 +199,15 @@ func SetupModuleProtoBase(logger *slog.Logger, extName string, feats *features) // ignore emebeded files for modules we are not working with switch moduleName { case "example": - if strings.Contains(fc.NewPath, "ibcmiddleware") { + if !strings.Contains(fc.NewPath, "example") { return nil } case "ibcmiddleware": - if strings.Contains(fc.NewPath, "example") { + if !strings.Contains(fc.NewPath, "ibcmiddleware") { + return nil + } + case "ibcmodule": + if !strings.Contains(fc.NewPath, "ibcmodule") { return nil } } @@ -204,11 +243,7 @@ func SetupModuleExtensionFiles(logger *slog.Logger, extName string, feats *featu return err } - moduleName := "example" - if feats.ibcMiddleware { - moduleName = "ibcmiddleware" - } - + moduleName := feats.getModuleType() goModName := spawn.ReadCurrentGoModuleName(path.Join(cwd, "go.mod")) // copy x/example to x/extName @@ -224,11 +259,15 @@ func SetupModuleExtensionFiles(logger *slog.Logger, extName string, feats *featu // ignore emebeded files for modules we are not working with switch moduleName { case "example": - if strings.Contains(fc.NewPath, "ibcmiddleware") { + if !strings.Contains(fc.NewPath, "example") { return nil } case "ibcmiddleware": - if strings.Contains(fc.NewPath, "example") { + if !strings.Contains(fc.NewPath, "ibcmiddleware") { + return nil + } + case "ibcmodule": + if !strings.Contains(fc.NewPath, "ibcmodule") { return nil } } @@ -310,6 +349,16 @@ func AddModuleToAppGo(logger *slog.Logger, extName string, feats *features) erro app.MsgServiceRouter(), app.IBCKeeper.ChannelKeeper, )`+"\n", extName, extNameTitle, extName) + } else if feats.ibcModule { + keeperText = fmt.Sprintf(` // Create the %s IBC Module Keeper + app.%sKeeper = %skeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(keys[%stypes.StoreKey]), + app.IBCKeeper.ChannelKeeper, + app.IBCKeeper.PortKeeper, + scoped%s, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + )`+"\n", extName, extNameTitle, extName, extName, extNameTitle) } else { keeperText = fmt.Sprintf(` // Create the %s Keeper app.%sKeeper = %skeeper.NewKeeper( @@ -322,17 +371,46 @@ func AddModuleToAppGo(logger *slog.Logger, extName string, feats *features) erro appGoLines = append(appGoLines[:evidenceTextLine+2], append([]string{keeperText}, appGoLines[evidenceTextLine+2:]...)...) + // ibcModule requires some more setup additions for scoped keepers and specific module routing within IBC. + if feats.ibcModule { + capabilityKeeperSeal := spawn.FindLineWithText(appGoLines, "app.CapabilityKeeper.Seal()") + logger.Debug("capabilityKeeperSeal", "extName", extName, "line", evidenceTextLine) + + // scopedMynsibc := app.CapabilityKeeper... + scopedKeeperText := fmt.Sprintf(` scoped%s := app.CapabilityKeeper.ScopeToModule(%stypes.ModuleName)`, extNameTitle, extName) + appGoLines = append(appGoLines[:capabilityKeeperSeal], append([]string{scopedKeeperText}, appGoLines[capabilityKeeperSeal:]...)...) + + // find ChainApp ScopedIBCKeeper (where keepers are saved) & save this new keeper to it + scopedIBCKeeperKeeper := spawn.FindLineWithText(appGoLines, "ScopedIBCKeeper") + logger.Debug("scopedIBCKeeperKeeper", "extName", extName, "line", scopedIBCKeeperKeeper) + scopedKeeper := fmt.Sprintf("Scoped%s", extNameTitle) + + line := fmt.Sprintf(` %s capabilitykeeper.ScopedKeeper`, scopedKeeper) + appGoLines = append(appGoLines[:scopedIBCKeeperKeeper+1], append([]string{line}, appGoLines[scopedIBCKeeperKeeper+1:]...)...) + + scopedIBCKeeper := spawn.FindLineWithText(appGoLines, "app.ScopedIBCKeeper =") + logger.Debug("scopedIBCKeeper", "extName", extName, "line", scopedIBCKeeper) + + line = fmt.Sprintf(` app.%s = scoped%s`, scopedKeeper, extNameTitle) + appGoLines = append(appGoLines[:scopedIBCKeeper], append([]string{line}, appGoLines[scopedIBCKeeper:]...)...) + + // find app.IBCKeeper.SetRouter + ibcKeeperSetRouter := spawn.FindLineWithText(appGoLines, "app.IBCKeeper.SetRouter(") + // place module above it `ibcRouter.AddRoute(nameserviceibctypes.ModuleName, nameserviceibc.NewIBCModule(app.NameserviceibcKeeper))` + newLine := fmt.Sprintf(` ibcRouter.AddRoute(%stypes.ModuleName, %s.NewExampleIBCModule(app.%sKeeper))`, extName, extName, extNameTitle) + appGoLines = append(appGoLines[:ibcKeeperSetRouter], append([]string{newLine}, appGoLines[ibcKeeperSetRouter:]...)...) + } + // Register the app module. start, end = spawn.FindLinesWithText(appGoLines, "NewManager(") logger.Debug("module manager", "extName", extName, "start", start, "end", end) var newAppModuleText string - if feats.ibcMiddleware { + if feats.isIBC() { newAppModuleText = fmt.Sprintf(` %s.NewAppModule(app.%sKeeper),`+"\n", extName, extNameTitle) } else { newAppModuleText = fmt.Sprintf(` %s.NewAppModule(appCodec, app.%sKeeper),`+"\n", extName, extNameTitle) } - appGoLines = append(appGoLines[:end-1], append([]string{newAppModuleText}, appGoLines[end-1:]...)...) // Set the begin block order of the new module. diff --git a/cmd/spawn/module_test.go b/cmd/spawn/module_test.go new file mode 100644 index 00000000..59f3eb86 --- /dev/null +++ b/cmd/spawn/module_test.go @@ -0,0 +1,90 @@ +package main_test + +import ( + "bytes" + "fmt" + "os" + "path" + "testing" + + main "github.com/rollchains/spawn/cmd/spawn" + "github.com/rollchains/spawn/spawn" + "github.com/stretchr/testify/require" +) + +func TestModuleGeneration(t *testing.T) { + cwd, err := os.Getwd() + require.NoError(t, err) + + cfg := spawn.NewChainConfig{ + ProjectName: "default", + Bech32Prefix: "cosmos", + HomeDir: ".default", + BinDaemon: main.RandStringBytes(6) + "d", + Denom: "token" + main.RandStringBytes(3), + GithubOrg: main.RandStringBytes(15), + IgnoreGitInit: false, + DisabledModules: []string{"explorer"}, + Logger: main.Logger, + } + + type mc struct { + Name string + Args []string + OutputContains string + } + + mcs := []mc{ + { + Name: "ibcmodule", + Args: []string{"new", "myibc", "--ibc-module"}, + }, + { + Name: "ibcmiddleware", + Args: []string{"new", "myibcmw", "--ibc-middleware"}, + }, + { + Name: "standard", + Args: []string{"new", "standard"}, + }, + } + + for _, c := range mcs { + c := c + t.Run(c.Name, func(t *testing.T) { + name := "spawnmoduleunittest" + c.Name + + cfg.ProjectName = name + cfg.HomeDir = "." + name + fmt.Println("=====\nName", name) + + dirPath := path.Join(cwd, name) + require.NoError(t, os.RemoveAll(name)) + + require.NoError(t, cfg.ValidateAndRun(false), "failed to generate proper chain") + + // move to new repo + require.NoError(t, os.Chdir(dirPath)) + + cmd := main.ModuleCmd() + b := bytes.NewBufferString("") + cmd.SetOut(b) + cmd.SetErr(b) + cmd.SetArgs(c.Args) + cmd.Execute() + // out, err := io.ReadAll(b) + // if err != nil { + // t.Fatal(err) + // } + + // TODO: this is not being read from. Fix. + // require.Contains(t, string(out), c.OutputContains, "output: "+string(out)) + + // validate the go source is good + main.AssertValidGeneration(t, dirPath, nil, nil, cfg) + + require.NoError(t, os.Chdir(cwd)) + require.NoError(t, os.RemoveAll(name)) + }) + } +} diff --git a/cmd/spawn/new_chain_test.go b/cmd/spawn/new_chain_test.go index 457cae07..1421bf70 100644 --- a/cmd/spawn/new_chain_test.go +++ b/cmd/spawn/new_chain_test.go @@ -2,13 +2,8 @@ package main import ( "fmt" - "go/format" - "io/fs" - "log/slog" - "math/rand" "os" "path" - "path/filepath" "strings" "testing" @@ -16,19 +11,10 @@ import ( "github.com/stretchr/testify/require" ) -var Logger = slog.New(slog.NewJSONHandler(os.Stdout, nil)) - func TestDisabledGeneration(t *testing.T) { cwd, err := os.Getwd() require.NoError(t, err) - allButStaking := make([]string, 0, len(spawn.AllFeatures)-1) - for _, f := range spawn.AllFeatures { - if f != spawn.POS { - allButStaking = append(allButStaking, f) - } - } - type disabledCase struct { Name string Disabled []string @@ -46,7 +32,7 @@ func TestDisabledGeneration(t *testing.T) { }, { Name: "everythingbutstaking", - Disabled: allButStaking, + Disabled: AllFeaturesButStaking(), }, { Name: "noibcaddons", @@ -104,44 +90,3 @@ func TestDisabledGeneration(t *testing.T) { }) } } - -const letterBytes = "abcdefghijklmnopqrstuvwxyz" - -func RandStringBytes(n int) string { - b := make([]byte, n) - for i := range b { - b[i] = letterBytes[rand.Intn(len(letterBytes))] - } - return string(b) -} - -func AssertValidGeneration(t *testing.T, dirPath string, dc []string, notContainAny []string, cfg spawn.NewChainConfig) { - fileCount := 0 - err := filepath.WalkDir(dirPath, func(p string, file fs.DirEntry, err error) error { - if err != nil { - return err - } - - fileCount++ - - if filepath.Ext(p) == ".go" { - base := path.Base(p) - - f, err := os.ReadFile(p) - require.NoError(t, err, fmt.Sprintf("can't read %s", base)) - - // ensure no disabled modules are present - for _, text := range notContainAny { - text := text - require.NotContains(t, string(f), text, fmt.Sprintf("disabled module %s found in %s (%s) with config %+v", text, base, p, cfg)) - } - - _, err = format.Source(f) - require.NoError(t, err, fmt.Sprintf("format issue: %v. using disabled: %v", base, dc)) - } - - return nil - }) - require.NoError(t, err, fmt.Sprintf("error walking directory for disabled: %v", dc)) - require.Greater(t, fileCount, 1, fmt.Sprintf("no files found in %s", dirPath)) -} diff --git a/cmd/spawn/test_helpers.go b/cmd/spawn/test_helpers.go new file mode 100644 index 00000000..dd040b57 --- /dev/null +++ b/cmd/spawn/test_helpers.go @@ -0,0 +1,69 @@ +package main + +import ( + "fmt" + "go/format" + "io/fs" + "log/slog" + "math/rand" + "os" + "path" + "path/filepath" + "testing" + + "github.com/rollchains/spawn/spawn" + "github.com/stretchr/testify/require" +) + +const letterBytes = "abcdefghijklmnopqrstuvwxyz" + +var Logger = slog.New(slog.NewJSONHandler(os.Stdout, nil)) + +func RandStringBytes(n int) string { + b := make([]byte, n) + for i := range b { + b[i] = letterBytes[rand.Intn(len(letterBytes))] + } + return string(b) +} + +func AssertValidGeneration(t *testing.T, dirPath string, dc []string, notContainAny []string, cfg spawn.NewChainConfig) { + fileCount := 0 + err := filepath.WalkDir(dirPath, func(p string, file fs.DirEntry, err error) error { + if err != nil { + return err + } + + fileCount++ + + if filepath.Ext(p) == ".go" { + base := path.Base(p) + + f, err := os.ReadFile(p) + require.NoError(t, err, fmt.Sprintf("can't read %s", base)) + + // ensure no disabled modules are present + for _, text := range notContainAny { + text := text + require.NotContains(t, string(f), text, fmt.Sprintf("disabled module %s found in %s (%s) with config %+v", text, base, p, cfg)) + } + + _, err = format.Source(f) + require.NoError(t, err, fmt.Sprintf("format issue: %v. using disabled: %v", base, dc)) + } + + return nil + }) + require.NoError(t, err, fmt.Sprintf("error walking directory for disabled: %v", dc)) + require.Greater(t, fileCount, 1, fmt.Sprintf("no files found in %s", dirPath)) +} + +func AllFeaturesButStaking() []string { + allButStaking := make([]string, 0, len(spawn.AllFeatures)-1) + for _, f := range spawn.AllFeatures { + if f != spawn.POS { + allButStaking = append(allButStaking, f) + } + } + return allButStaking +} diff --git a/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md b/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md index 41529f58..54af7780 100644 --- a/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md +++ b/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md @@ -43,4 +43,12 @@ source ~/.bashrc # MacOS echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc source ~/.zshrc + +# Legacy MacOS Go +echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.zshrc +source ~/.zshrc + +# Sometimes it can be good to also clear your cache +# especially WSL users +go clean -cache ``` diff --git a/docs/versioned_docs/version-v0.50.x/02-build-your-chain/03-application-logic.md b/docs/versioned_docs/version-v0.50.x/02-build-your-chain/03-application-logic.md index 1664071c..472ca82e 100644 --- a/docs/versioned_docs/version-v0.50.x/02-build-your-chain/03-application-logic.md +++ b/docs/versioned_docs/version-v0.50.x/02-build-your-chain/03-application-logic.md @@ -14,8 +14,6 @@ You now need to set the data structure in the keeper to store the wallet to name type Keeper struct { ... NameMapping collections.Map[string, string] - - ... } ... diff --git a/docs/versioned_docs/version-v0.50.x/02-build-your-chain/05-testnet.md b/docs/versioned_docs/version-v0.50.x/02-build-your-chain/05-testnet.md index 3701d6a3..73642ba7 100644 --- a/docs/versioned_docs/version-v0.50.x/02-build-your-chain/05-testnet.md +++ b/docs/versioned_docs/version-v0.50.x/02-build-your-chain/05-testnet.md @@ -58,4 +58,9 @@ The expected result should be: } ``` +:::note +When you are ready to stop the testnet, you can use `ctrl + c` or `killall -9 rolld`. +::: + + Your network is now running and you have successfully set and resolved a name! 🎉 diff --git a/docs/versioned_docs/version-v0.50.x/02-build-your-chain/06-extra-challenge.md b/docs/versioned_docs/version-v0.50.x/02-build-your-chain/06-extra-challenge.md index 846458de..eb91d8c6 100644 --- a/docs/versioned_docs/version-v0.50.x/02-build-your-chain/06-extra-challenge.md +++ b/docs/versioned_docs/version-v0.50.x/02-build-your-chain/06-extra-challenge.md @@ -33,3 +33,5 @@ func (ms msgServer) SetServiceName(ctx context.Context, msg *types.MsgSetService } ``` + + diff --git a/docs/versioned_docs/version-v0.50.x/02-build-your-chain/07-conclusion.md b/docs/versioned_docs/version-v0.50.x/02-build-your-chain/07-conclusion.md index 6c99c988..3d5e7169 100644 --- a/docs/versioned_docs/version-v0.50.x/02-build-your-chain/07-conclusion.md +++ b/docs/versioned_docs/version-v0.50.x/02-build-your-chain/07-conclusion.md @@ -19,4 +19,10 @@ You just crafted your first blockchain, module, and custom logic with Spawn. You * Running a local testnet * Interacting with the network +# What's Next? + +Extend the NameService to include IBC support with the [ibc-module](../03-demos/02-ibc-module.md) tutorial. + + + diff --git a/docs/versioned_docs/version-v0.50.x/03-demos/01-demo.md b/docs/versioned_docs/version-v0.50.x/03-demos/01-demo.md index 0b31176a..d3890301 100644 --- a/docs/versioned_docs/version-v0.50.x/03-demos/01-demo.md +++ b/docs/versioned_docs/version-v0.50.x/03-demos/01-demo.md @@ -1,6 +1,6 @@ --- -title: "IBC Demo" -sidebar_label: "IBC Demo" +title: "IBC Transfers" +sidebar_label: "IBC Transfer Demo" sidebar_position: 1 slug: /demo/ibc --- diff --git a/docs/versioned_docs/version-v0.50.x/03-demos/02-ibc-module.md b/docs/versioned_docs/version-v0.50.x/03-demos/02-ibc-module.md new file mode 100644 index 00000000..ba87b067 --- /dev/null +++ b/docs/versioned_docs/version-v0.50.x/03-demos/02-ibc-module.md @@ -0,0 +1,216 @@ +--- +title: "IBC Module" +sidebar_label: "IBC NameService Module" +sidebar_position: 1 +slug: /demo/ibc-module +--- + +# IBC NameService Module + +In this tutorial, you will build on the [nameservice tutorial](../02-build-your-chain/01-nameservice.md) to add cross chain functionality. This will allow you to sent a name from another network. + +## Prerequisites +- [System Setup](../01-setup/01-system-setup.md) +- [Install Spawn](../01-setup/02-install-spawn.md) +- [Build Your Name Service Chain Turotial](../02-build-your-chain/01-nameservice.md) + +## Create your chain + +You should already have a network, `rollchain`, with the nameservice module from the [nameservice tutorial](../02-build-your-chain/01-nameservice.md). If you do not, complete that tutorial now. + +:::note warning +Make sure you do not have the previous testnet still running by stopping it with: `killall -9 rolld` +::: + +## Scaffold the IBC Module + +```bash +# if you are not already in the chain directory: +cd rollchain + +# scaffold the base IBC module for The +# cross chain name service +spawn module new nsibc --ibc-module +``` + +## Import the other NameService Module + +You now reference the nameservice module you built within this new IBC module. This will allow you to save the name mapping on the name service, making it available for both IBC and native chain interactions. + +```go title="x/nsibc/keeper/keeper.go" +import ( + ... + nameservicekeeper "github.com/rollchains/rollchain/x/nameservice/keeper" +) + +type Keeper struct { + ... + NameServiceKeeper *nameservicekeeper.Keeper +} +``` + +
+ Keeper Setup Image + + ![View](https://github.com/user-attachments/assets/4dd3e50d-1528-4ae4-91a2-a27612bf69d7) +
+ + +```go title="x/nsibc/keeper/keeper.go" +// NewKeeper creates a new Keeper instance. +func NewKeeper( + ... + nsk *nameservicekeeper.Keeper, +) Keeper { + ... + + k := Keeper{ + ... + NameServiceKeeper: nsk, + } +``` +
+ NewKeeper Image + + ![View](https://github.com/user-attachments/assets/7639e468-a354-468d-8368-6bedd3c142a7) +
+ +## Provide NameService to the IBC Module + +You must now give the IBC module access to nameservice keeper. It needs this reference so that the logic and connections can be shared. This is done in the `app/app.go` file. Find where the EvidenceKeeper line is, and overwrite the current lines with the following. + +This moves the `NameserviceKeeper` above the IBC keeper (since you need to set that first so you can use it), and adds the `&app.NameserviceKeeper,` to the IBC Name Service keeper. + +```go title="app/app.go" + // If evidence needs to be handled for the app, set routes in router here and seal + app.EvidenceKeeper = *evidenceKeeper + + // Create the nameservice Keeper + app.NameserviceKeeper = nameservicekeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(keys[nameservicetypes.StoreKey]), + logger, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + // Create the nsibc IBC Module Keeper + app.NsibcKeeper = nsibckeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(keys[nsibctypes.StoreKey]), + app.IBCKeeper.ChannelKeeper, + app.IBCKeeper.PortKeeper, + scopedNsibc, + &app.NameserviceKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) +``` + +
+ Application NameService Reference Image + + ![View](https://github.com/user-attachments/assets/af456634-d7b7-475f-b468-7c14411803da) +
+ + + +## Set Name on IBC Packet + +Now that the IBC module has access to the nameservice, you can add the logic to set a name received from another chain (called the counterparty). To implement, the `OnRecvPacket` method has a placeholder for where the logic should run called `handleOnRecvLogic`. Find the `OnRecvPacket` in the ibc_module.go file, then find where the `handleOnRecvLogic` method resides. + +```go title="x/nsibc/ibc_module.go" +// Find this method in the file +func (im ExampleIBCModule) handleOnRecvLogic(ctx context.Context, data types.ExamplePacketData) error { + ... + return nil +} +``` + +
+ handleOnRecvLogic location + + ![View](https://github.com/user-attachments/assets/011cb6cb-6664-47b9-a09e-fe1b62862987) +
+ + + +Once found, remove the lines within and replace with the following return. + +```go title="x/nsibc/ibc_module.go" +func (im ExampleIBCModule) handleOnRecvLogic(ctx context.Context, data types.ExamplePacketData) error { + return im.keeper.NameServiceKeeper.NameMapping.Set(ctx, data.Sender, data.SomeData) +} +``` + +This sets the name mapping from the sender to some data (the name) in the original nameservice module. + +:::note +This is for example to show cross module interaction / extension with IBC. +You could just as easily write the NameMapping in the ibc keeper store as well. +::: + +## Start Testnet + +```bash +# build chain binary +make install + +# verify the binary works +rolld + +# build docker image +make local-image + +# run testnet between itself and an IBC relayer +# this will take a minute +local-ic start self-ibc +``` + +## Import Testnet Helpers + +Pasting the following lines in your terminal will import helper functions to interact with the testnet. +The source is publicly available on GitHub to review. + +```bash +# Import the testnet interaction helper functions +# for local-interchain +source <(curl -s https://raw.githubusercontent.com/strangelove-ventures/interchaintest/main/local-interchain/bash/source.bash) +API_ADDR="http://localhost:8080" + +# Waits for the testnet to start +ICT_POLL_FOR_START $API_ADDR 50 && echo "Testnet started" +``` + +## Connect Your IBC Modules + +You are ready to connect the two chains with your IBC module protocol. The [cosmos/relayer](https://github.com/cosmos/relayer) is already running between the 2 networks now. You will just send a command to connect the new logic. + +:::note +A Channel is a connection between two chains, like a highway. A port is a specific protocol (or logic) that can connect with itself on another chain. +For example; transfer to transfer, nsibc to nsibc, but transfer to nsibc can not be done. The version is just extra information (metadata) about the connection. + +These values are found in the keys.go file as the module name. By default version is just the module name + "-1". +::: + + +```bash +# This will take a minute. +ICT_RELAYER_EXEC $API_ADDR "localchain-1" "rly tx connect localchain-1_localchain-2 --src-port=nsibc --dst-port=nsibc --order=unordered --version=nsibc-1" + +# Running the channels command now shows 2 channels, one for `transfer` +# and 1 for `nsibc`, marked as channel-1. +echo `ICT_RELAYER_CHANNELS $API_ADDR "localchain-1"` +``` + +## Submit Name Service Name Over IBC +```bash +# Set the IBC name from chain 1. +# view this command in x/nsibc/client/tx.go +rolld tx nsibc example-tx nsibc channel-1 testname --from acc0 --chain-id localchain-1 --yes + +# View the logs +rolld q tx 8A2009667022BE432B60158498C2256AEED0E86E9DFF79BD11CC9EA70DEC4A8A + +# Verify chain 2 set the name ( +# `rolld keys show -a acc0` from chain-1 +ICT_QUERY "http://localhost:8080" "localchain-2" "nameservice resolve roll1hj5fveer5cjtn4wd6wstzugjfdxzl0xpg2te87" +``` diff --git a/simapp/api/example/module/v1/module.pulsar.go b/simapp/api/example/module/v1/module.pulsar.go index eca68b74..f01a6566 100644 --- a/simapp/api/example/module/v1/module.pulsar.go +++ b/simapp/api/example/module/v1/module.pulsar.go @@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.example.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: example.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.example.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message example.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.example.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: example.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.example.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message example.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.example.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: example.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.example.module.v1.Module does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message example.module.v1.Module does not contain field %s", descriptor.FullName())) } } @@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.example.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: example.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.example.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message example.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.example.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: example.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.example.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message example.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.example.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: example.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.example.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message example.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.simapp.example.module.v1.Module", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in example.module.v1.Module", d.FullName())) } panic("unreachable") } @@ -415,36 +415,27 @@ var File_example_module_v1_module_proto protoreflect.FileDescriptor var file_example_module_v1_module_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x2d, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, - 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2e, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, - 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x2e, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x24, 0xba, 0xc0, 0x96, - 0xda, 0x01, 0x1e, 0x0a, 0x1c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, - 0x70, 0x42, 0xd2, 0x02, 0x0a, 0x31, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x73, - 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x69, - 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x53, 0x53, 0x45, 0x4d, 0xaa, 0x02, 0x2c, 0x53, 0x74, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x2e, 0x53, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x2c, 0x53, 0x74, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, - 0x53, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x5c, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x38, 0x53, 0x74, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x53, - 0x69, 0x6d, 0x61, 0x70, 0x70, 0x5c, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x30, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, - 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x3a, 0x3a, 0x53, 0x69, 0x6d, 0x61, 0x70, - 0x70, 0x3a, 0x3a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x11, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, + 0x2a, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x24, 0x0a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, + 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x42, 0xcd, 0x01, 0x0a, 0x15, + 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, + 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x4d, 0x58, 0xaa, 0x02, 0x11, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x11, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, + 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -461,7 +452,7 @@ func file_example_module_v1_module_proto_rawDescGZIP() []byte { var file_example_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_example_module_v1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: strangelove_ventures.simapp.example.module.v1.Module + (*Module)(nil), // 0: example.module.v1.Module } var file_example_module_v1_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/simapp/api/example/v1/genesis.pulsar.go b/simapp/api/example/v1/genesis.pulsar.go index bcb65135..eb203ff5 100644 --- a/simapp/api/example/v1/genesis.pulsar.go +++ b/simapp/api/example/v1/genesis.pulsar.go @@ -878,7 +878,7 @@ type GenesisState struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Params defines all the paramaters of the module. + // Params defines all the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } @@ -961,17 +961,18 @@ var file_example_v1_genesis_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x1b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x9e, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, + 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xa4, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, + 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x73, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x16, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x45, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, 0x02, 0x0a, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/simapp/api/example/v1/query.pulsar.go b/simapp/api/example/v1/query.pulsar.go index 9bce1ada..15052c20 100644 --- a/simapp/api/example/v1/query.pulsar.go +++ b/simapp/api/example/v1/query.pulsar.go @@ -902,17 +902,18 @@ var file_example_v1_query_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x9c, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xa2, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x69, - 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x45, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, - 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, + 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x45, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/simapp/api/example/v1/state.pulsar.go b/simapp/api/example/v1/state.pulsar.go index 516cb7f5..a0c58fe2 100644 --- a/simapp/api/example/v1/state.pulsar.go +++ b/simapp/api/example/v1/state.pulsar.go @@ -552,17 +552,17 @@ var file_example_v1_state_proto_rawDesc = []byte{ 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x1f, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x19, 0x0a, 0x09, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0x01, 0x18, 0x01, 0x42, - 0x9c, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, + 0xa2, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, - 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, 0x02, 0x0a, - 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, + 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, + 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x45, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/simapp/api/example/v1/tx.pulsar.go b/simapp/api/example/v1/tx.pulsar.go index 81fde882..a08fd01c 100644 --- a/simapp/api/example/v1/tx.pulsar.go +++ b/simapp/api/example/v1/tx.pulsar.go @@ -990,18 +990,18 @@ var file_example_v1_tx_proto_rawDesc = []byte{ 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x23, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x99, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x9f, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x76, - 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, + 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x45, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x45, 0x58, 0x58, 0xaa, + 0x02, 0x0a, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x45, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x45, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/simapp/api/ibcmiddleware/module/v1/module.pulsar.go b/simapp/api/ibcmiddleware/module/v1/module.pulsar.go index 27bff7e8..8ff58cb5 100644 --- a/simapp/api/ibcmiddleware/module/v1/module.pulsar.go +++ b/simapp/api/ibcmiddleware/module/v1/module.pulsar.go @@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.ibcmiddleware.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmiddleware.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.ibcmiddleware.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmiddleware.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.ibcmiddleware.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmiddleware.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.ibcmiddleware.module.v1.Module does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message ibcmiddleware.module.v1.Module does not contain field %s", descriptor.FullName())) } } @@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.ibcmiddleware.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmiddleware.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.ibcmiddleware.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmiddleware.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.simapp.ibcmiddleware.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmiddleware.module.v1.Module")) } - panic(fmt.Errorf("message strangelove_ventures.simapp.ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message ibcmiddleware.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.simapp.ibcmiddleware.module.v1.Module", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in ibcmiddleware.module.v1.Module", d.FullName())) } panic("unreachable") } @@ -415,39 +415,30 @@ var File_ibcmiddleware_module_v1_module_proto protoreflect.FileDescriptor var file_ibcmiddleware_module_v1_module_proto_rawDesc = []byte{ 0x0a, 0x24, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, - 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x73, 0x69, 0x6d, - 0x61, 0x70, 0x70, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, - 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, - 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x24, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x1e, 0x0a, - 0x1c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x42, 0xf6, 0x02, - 0x0a, 0x37, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, - 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x73, 0x69, 0x6d, 0x61, 0x70, - 0x70, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, - 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x62, 0x63, 0x6d, 0x69, - 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, - 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x53, 0x53, - 0x49, 0x4d, 0xaa, 0x02, 0x32, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, - 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2e, - 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x32, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x53, 0x69, - 0x6d, 0x61, 0x70, 0x70, 0x5c, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, - 0x72, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x3e, 0x53, - 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x5c, 0x53, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x5c, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, - 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x36, - 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x3a, 0x3a, 0x53, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x3a, 0x3a, 0x49, 0x62, 0x63, - 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, + 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, + 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x34, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x2a, 0xba, 0xc0, 0x96, + 0xda, 0x01, 0x24, 0x0a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, + 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x42, 0xf1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, + 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, + 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, + 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x49, 0x4d, 0x58, 0xaa, 0x02, 0x17, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, + 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x17, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x23, 0x49, 0x62, 0x63, 0x6d, + 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x19, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x3a, + 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -464,7 +455,7 @@ func file_ibcmiddleware_module_v1_module_proto_rawDescGZIP() []byte { var file_ibcmiddleware_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_ibcmiddleware_module_v1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: strangelove_ventures.simapp.ibcmiddleware.module.v1.Module + (*Module)(nil), // 0: ibcmiddleware.module.v1.Module } var file_ibcmiddleware_module_v1_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/simapp/api/ibcmiddleware/v1/genesis.pulsar.go b/simapp/api/ibcmiddleware/v1/genesis.pulsar.go index d5064e7d..a92451fd 100644 --- a/simapp/api/ibcmiddleware/v1/genesis.pulsar.go +++ b/simapp/api/ibcmiddleware/v1/genesis.pulsar.go @@ -417,20 +417,21 @@ var file_ibcmiddleware_v1_genesis_proto_rawDesc = []byte{ 0x12, 0x10, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0xc8, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, + 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0xce, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, - 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, - 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, - 0x72, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x49, 0x62, 0x63, - 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, - 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1c, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x11, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, + 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, + 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, + 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x62, 0x63, 0x6d, 0x69, + 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, + 0xaa, 0x02, 0x10, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, + 0x61, 0x72, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, + 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, + 0x65, 0x77, 0x61, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/simapp/api/ibcmiddleware/v1/query.pulsar.go b/simapp/api/ibcmiddleware/v1/query.pulsar.go index b228e7a7..421d97a4 100644 --- a/simapp/api/ibcmiddleware/v1/query.pulsar.go +++ b/simapp/api/ibcmiddleware/v1/query.pulsar.go @@ -28,20 +28,20 @@ var file_ibcmiddleware_v1_query_proto_rawDesc = []byte{ 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0xc6, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0xcc, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x42, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x76, 0x31, - 0x3b, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, - 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x49, 0x62, 0x63, 0x6d, - 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x49, - 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x49, 0x62, - 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, + 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, + 0x61, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, + 0x77, 0x61, 0x72, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x49, + 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x10, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, + 0x72, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x11, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, + 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_ibcmiddleware_v1_query_proto_goTypes = []interface{}{} diff --git a/simapp/api/ibcmiddleware/v1/tx.pulsar.go b/simapp/api/ibcmiddleware/v1/tx.pulsar.go index c7b871f2..e3e37956 100644 --- a/simapp/api/ibcmiddleware/v1/tx.pulsar.go +++ b/simapp/api/ibcmiddleware/v1/tx.pulsar.go @@ -28,20 +28,20 @@ var file_ibcmiddleware_v1_tx_proto_rawDesc = []byte{ 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x42, 0xc3, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x6d, + 0x6f, 0x74, 0x6f, 0x42, 0xc9, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, - 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, - 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x62, 0x63, 0x6d, 0x69, - 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, - 0xaa, 0x02, 0x10, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, - 0x61, 0x72, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, - 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, - 0x65, 0x77, 0x61, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x76, 0x31, + 0x3b, 0x69, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x10, 0x49, 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, + 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x49, 0x62, 0x63, 0x6d, + 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x49, + 0x62, 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x49, 0x62, + 0x63, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_ibcmiddleware_v1_tx_proto_goTypes = []interface{}{} diff --git a/simapp/api/ibcmodule/module/v1/module.pulsar.go b/simapp/api/ibcmodule/module/v1/module.pulsar.go new file mode 100644 index 00000000..4fcc0c1f --- /dev/null +++ b/simapp/api/ibcmodule/module/v1/module.pulsar.go @@ -0,0 +1,503 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Module protoreflect.MessageDescriptor +) + +func init() { + file_ibcmodule_module_v1_module_proto_init() + md_Module = File_ibcmodule_module_v1_module_proto.Messages().ByName("Module") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_ibcmodule_module_v1_module_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.module.v1.Module")) + } + panic(fmt.Errorf("message ibcmodule.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.module.v1.Module")) + } + panic(fmt.Errorf("message ibcmodule.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.module.v1.Module")) + } + panic(fmt.Errorf("message ibcmodule.module.v1.Module does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.module.v1.Module")) + } + panic(fmt.Errorf("message ibcmodule.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.module.v1.Module")) + } + panic(fmt.Errorf("message ibcmodule.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.module.v1.Module")) + } + panic(fmt.Errorf("message ibcmodule.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ibcmodule.module.v1.Module", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Module) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ibcmodule/module/v1/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module is the app config object of the module. +// Learn more: https://docs.cosmos.network/main/building-modules/depinject +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_ibcmodule_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_ibcmodule_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +var File_ibcmodule_module_v1_module_proto protoreflect.FileDescriptor + +var file_ibcmodule_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x06, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x3a, 0x2a, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x24, 0x0a, 0x22, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x42, + 0xd9, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x49, 0x4d, 0x58, 0xaa, 0x02, 0x13, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x49, 0x62, + 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x1f, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, + 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_ibcmodule_module_v1_module_proto_rawDescOnce sync.Once + file_ibcmodule_module_v1_module_proto_rawDescData = file_ibcmodule_module_v1_module_proto_rawDesc +) + +func file_ibcmodule_module_v1_module_proto_rawDescGZIP() []byte { + file_ibcmodule_module_v1_module_proto_rawDescOnce.Do(func() { + file_ibcmodule_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_ibcmodule_module_v1_module_proto_rawDescData) + }) + return file_ibcmodule_module_v1_module_proto_rawDescData +} + +var file_ibcmodule_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_ibcmodule_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: ibcmodule.module.v1.Module +} +var file_ibcmodule_module_v1_module_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ibcmodule_module_v1_module_proto_init() } +func file_ibcmodule_module_v1_module_proto_init() { + if File_ibcmodule_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ibcmodule_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ibcmodule_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ibcmodule_module_v1_module_proto_goTypes, + DependencyIndexes: file_ibcmodule_module_v1_module_proto_depIdxs, + MessageInfos: file_ibcmodule_module_v1_module_proto_msgTypes, + }.Build() + File_ibcmodule_module_v1_module_proto = out.File + file_ibcmodule_module_v1_module_proto_rawDesc = nil + file_ibcmodule_module_v1_module_proto_goTypes = nil + file_ibcmodule_module_v1_module_proto_depIdxs = nil +} diff --git a/simapp/api/ibcmodule/v1/genesis.pulsar.go b/simapp/api/ibcmodule/v1/genesis.pulsar.go new file mode 100644 index 00000000..4f2deb36 --- /dev/null +++ b/simapp/api/ibcmodule/v1/genesis.pulsar.go @@ -0,0 +1,570 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package ibcmodulev1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_port_id protoreflect.FieldDescriptor +) + +func init() { + file_ibcmodule_v1_genesis_proto_init() + md_GenesisState = File_ibcmodule_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_port_id = md_GenesisState.Fields().ByName("port_id") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_ibcmodule_v1_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.PortId != "" { + value := protoreflect.ValueOfString(x.PortId) + if !f(fd_GenesisState_port_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ibcmodule.v1.GenesisState.port_id": + return x.PortId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.GenesisState")) + } + panic(fmt.Errorf("message ibcmodule.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ibcmodule.v1.GenesisState.port_id": + x.PortId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.GenesisState")) + } + panic(fmt.Errorf("message ibcmodule.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ibcmodule.v1.GenesisState.port_id": + value := x.PortId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.GenesisState")) + } + panic(fmt.Errorf("message ibcmodule.v1.GenesisState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ibcmodule.v1.GenesisState.port_id": + x.PortId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.GenesisState")) + } + panic(fmt.Errorf("message ibcmodule.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.GenesisState.port_id": + panic(fmt.Errorf("field port_id of message ibcmodule.v1.GenesisState is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.GenesisState")) + } + panic(fmt.Errorf("message ibcmodule.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.GenesisState.port_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.GenesisState")) + } + panic(fmt.Errorf("message ibcmodule.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ibcmodule.v1.GenesisState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.PortId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.PortId) > 0 { + i -= len(x.PortId) + copy(dAtA[i:], x.PortId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PortId))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ibcmodule/v1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the modules genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_ibcmodule_v1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_ibcmodule_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetPortId() string { + if x != nil { + return x.PortId + } + return "" +} + +var File_ibcmodule_v1_genesis_proto protoreflect.FileDescriptor + +var file_ibcmodule_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x69, 0x62, + 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x27, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, + 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, + 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, + 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0d, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ibcmodule_v1_genesis_proto_rawDescOnce sync.Once + file_ibcmodule_v1_genesis_proto_rawDescData = file_ibcmodule_v1_genesis_proto_rawDesc +) + +func file_ibcmodule_v1_genesis_proto_rawDescGZIP() []byte { + file_ibcmodule_v1_genesis_proto_rawDescOnce.Do(func() { + file_ibcmodule_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_ibcmodule_v1_genesis_proto_rawDescData) + }) + return file_ibcmodule_v1_genesis_proto_rawDescData +} + +var file_ibcmodule_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_ibcmodule_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: ibcmodule.v1.GenesisState +} +var file_ibcmodule_v1_genesis_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ibcmodule_v1_genesis_proto_init() } +func file_ibcmodule_v1_genesis_proto_init() { + if File_ibcmodule_v1_genesis_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ibcmodule_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ibcmodule_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ibcmodule_v1_genesis_proto_goTypes, + DependencyIndexes: file_ibcmodule_v1_genesis_proto_depIdxs, + MessageInfos: file_ibcmodule_v1_genesis_proto_msgTypes, + }.Build() + File_ibcmodule_v1_genesis_proto = out.File + file_ibcmodule_v1_genesis_proto_rawDesc = nil + file_ibcmodule_v1_genesis_proto_goTypes = nil + file_ibcmodule_v1_genesis_proto_depIdxs = nil +} diff --git a/simapp/api/ibcmodule/v1/query.pulsar.go b/simapp/api/ibcmodule/v1/query.pulsar.go new file mode 100644 index 00000000..4da97ff5 --- /dev/null +++ b/simapp/api/ibcmodule/v1/query.pulsar.go @@ -0,0 +1,76 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package ibcmodulev1 + +import ( + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ibcmodule/v1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_ibcmodule_v1_query_proto protoreflect.FileDescriptor + +var file_ibcmodule_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x69, 0x62, 0x63, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0xb0, + 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, + 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x2f, 0x73, + 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x62, 0x63, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0d, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_ibcmodule_v1_query_proto_goTypes = []interface{}{} +var file_ibcmodule_v1_query_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ibcmodule_v1_query_proto_init() } +func file_ibcmodule_v1_query_proto_init() { + if File_ibcmodule_v1_query_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ibcmodule_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ibcmodule_v1_query_proto_goTypes, + DependencyIndexes: file_ibcmodule_v1_query_proto_depIdxs, + }.Build() + File_ibcmodule_v1_query_proto = out.File + file_ibcmodule_v1_query_proto_rawDesc = nil + file_ibcmodule_v1_query_proto_goTypes = nil + file_ibcmodule_v1_query_proto_depIdxs = nil +} diff --git a/simapp/api/ibcmodule/v1/tx.pulsar.go b/simapp/api/ibcmodule/v1/tx.pulsar.go new file mode 100644 index 00000000..2cc229c6 --- /dev/null +++ b/simapp/api/ibcmodule/v1/tx.pulsar.go @@ -0,0 +1,2492 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package ibcmodulev1 + +import ( + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgSendExampleTx protoreflect.MessageDescriptor + fd_MsgSendExampleTx_sender protoreflect.FieldDescriptor + fd_MsgSendExampleTx_source_port protoreflect.FieldDescriptor + fd_MsgSendExampleTx_source_channel protoreflect.FieldDescriptor + fd_MsgSendExampleTx_timeout_timestamp protoreflect.FieldDescriptor + fd_MsgSendExampleTx_some_data protoreflect.FieldDescriptor +) + +func init() { + file_ibcmodule_v1_tx_proto_init() + md_MsgSendExampleTx = File_ibcmodule_v1_tx_proto.Messages().ByName("MsgSendExampleTx") + fd_MsgSendExampleTx_sender = md_MsgSendExampleTx.Fields().ByName("sender") + fd_MsgSendExampleTx_source_port = md_MsgSendExampleTx.Fields().ByName("source_port") + fd_MsgSendExampleTx_source_channel = md_MsgSendExampleTx.Fields().ByName("source_channel") + fd_MsgSendExampleTx_timeout_timestamp = md_MsgSendExampleTx.Fields().ByName("timeout_timestamp") + fd_MsgSendExampleTx_some_data = md_MsgSendExampleTx.Fields().ByName("some_data") +} + +var _ protoreflect.Message = (*fastReflection_MsgSendExampleTx)(nil) + +type fastReflection_MsgSendExampleTx MsgSendExampleTx + +func (x *MsgSendExampleTx) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSendExampleTx)(x) +} + +func (x *MsgSendExampleTx) slowProtoReflect() protoreflect.Message { + mi := &file_ibcmodule_v1_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSendExampleTx_messageType fastReflection_MsgSendExampleTx_messageType +var _ protoreflect.MessageType = fastReflection_MsgSendExampleTx_messageType{} + +type fastReflection_MsgSendExampleTx_messageType struct{} + +func (x fastReflection_MsgSendExampleTx_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSendExampleTx)(nil) +} +func (x fastReflection_MsgSendExampleTx_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSendExampleTx) +} +func (x fastReflection_MsgSendExampleTx_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSendExampleTx +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSendExampleTx) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSendExampleTx +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSendExampleTx) Type() protoreflect.MessageType { + return _fastReflection_MsgSendExampleTx_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSendExampleTx) New() protoreflect.Message { + return new(fastReflection_MsgSendExampleTx) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSendExampleTx) Interface() protoreflect.ProtoMessage { + return (*MsgSendExampleTx)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSendExampleTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgSendExampleTx_sender, value) { + return + } + } + if x.SourcePort != "" { + value := protoreflect.ValueOfString(x.SourcePort) + if !f(fd_MsgSendExampleTx_source_port, value) { + return + } + } + if x.SourceChannel != "" { + value := protoreflect.ValueOfString(x.SourceChannel) + if !f(fd_MsgSendExampleTx_source_channel, value) { + return + } + } + if x.TimeoutTimestamp != uint64(0) { + value := protoreflect.ValueOfUint64(x.TimeoutTimestamp) + if !f(fd_MsgSendExampleTx_timeout_timestamp, value) { + return + } + } + if x.SomeData != "" { + value := protoreflect.ValueOfString(x.SomeData) + if !f(fd_MsgSendExampleTx_some_data, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSendExampleTx) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTx.sender": + return x.Sender != "" + case "ibcmodule.v1.MsgSendExampleTx.source_port": + return x.SourcePort != "" + case "ibcmodule.v1.MsgSendExampleTx.source_channel": + return x.SourceChannel != "" + case "ibcmodule.v1.MsgSendExampleTx.timeout_timestamp": + return x.TimeoutTimestamp != uint64(0) + case "ibcmodule.v1.MsgSendExampleTx.some_data": + return x.SomeData != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTx")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTx does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSendExampleTx) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTx.sender": + x.Sender = "" + case "ibcmodule.v1.MsgSendExampleTx.source_port": + x.SourcePort = "" + case "ibcmodule.v1.MsgSendExampleTx.source_channel": + x.SourceChannel = "" + case "ibcmodule.v1.MsgSendExampleTx.timeout_timestamp": + x.TimeoutTimestamp = uint64(0) + case "ibcmodule.v1.MsgSendExampleTx.some_data": + x.SomeData = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTx")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTx does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSendExampleTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ibcmodule.v1.MsgSendExampleTx.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "ibcmodule.v1.MsgSendExampleTx.source_port": + value := x.SourcePort + return protoreflect.ValueOfString(value) + case "ibcmodule.v1.MsgSendExampleTx.source_channel": + value := x.SourceChannel + return protoreflect.ValueOfString(value) + case "ibcmodule.v1.MsgSendExampleTx.timeout_timestamp": + value := x.TimeoutTimestamp + return protoreflect.ValueOfUint64(value) + case "ibcmodule.v1.MsgSendExampleTx.some_data": + value := x.SomeData + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTx")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTx does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSendExampleTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTx.sender": + x.Sender = value.Interface().(string) + case "ibcmodule.v1.MsgSendExampleTx.source_port": + x.SourcePort = value.Interface().(string) + case "ibcmodule.v1.MsgSendExampleTx.source_channel": + x.SourceChannel = value.Interface().(string) + case "ibcmodule.v1.MsgSendExampleTx.timeout_timestamp": + x.TimeoutTimestamp = value.Uint() + case "ibcmodule.v1.MsgSendExampleTx.some_data": + x.SomeData = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTx")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTx does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSendExampleTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTx.sender": + panic(fmt.Errorf("field sender of message ibcmodule.v1.MsgSendExampleTx is not mutable")) + case "ibcmodule.v1.MsgSendExampleTx.source_port": + panic(fmt.Errorf("field source_port of message ibcmodule.v1.MsgSendExampleTx is not mutable")) + case "ibcmodule.v1.MsgSendExampleTx.source_channel": + panic(fmt.Errorf("field source_channel of message ibcmodule.v1.MsgSendExampleTx is not mutable")) + case "ibcmodule.v1.MsgSendExampleTx.timeout_timestamp": + panic(fmt.Errorf("field timeout_timestamp of message ibcmodule.v1.MsgSendExampleTx is not mutable")) + case "ibcmodule.v1.MsgSendExampleTx.some_data": + panic(fmt.Errorf("field some_data of message ibcmodule.v1.MsgSendExampleTx is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTx")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTx does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSendExampleTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTx.sender": + return protoreflect.ValueOfString("") + case "ibcmodule.v1.MsgSendExampleTx.source_port": + return protoreflect.ValueOfString("") + case "ibcmodule.v1.MsgSendExampleTx.source_channel": + return protoreflect.ValueOfString("") + case "ibcmodule.v1.MsgSendExampleTx.timeout_timestamp": + return protoreflect.ValueOfUint64(uint64(0)) + case "ibcmodule.v1.MsgSendExampleTx.some_data": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTx")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTx does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSendExampleTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ibcmodule.v1.MsgSendExampleTx", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSendExampleTx) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSendExampleTx) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSendExampleTx) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSendExampleTx) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSendExampleTx) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourcePort) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChannel) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TimeoutTimestamp != 0 { + n += 1 + runtime.Sov(uint64(x.TimeoutTimestamp)) + } + l = len(x.SomeData) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSendExampleTx) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.SomeData) > 0 { + i -= len(x.SomeData) + copy(dAtA[i:], x.SomeData) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SomeData))) + i-- + dAtA[i] = 0x2a + } + if x.TimeoutTimestamp != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TimeoutTimestamp)) + i-- + dAtA[i] = 0x20 + } + if len(x.SourceChannel) > 0 { + i -= len(x.SourceChannel) + copy(dAtA[i:], x.SourceChannel) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChannel))) + i-- + dAtA[i] = 0x1a + } + if len(x.SourcePort) > 0 { + i -= len(x.SourcePort) + copy(dAtA[i:], x.SourcePort) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourcePort))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSendExampleTx) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSendExampleTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSendExampleTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourcePort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourcePort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChannel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) + } + x.TimeoutTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.TimeoutTimestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SomeData", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SomeData = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSendExampleTxResponse protoreflect.MessageDescriptor + fd_MsgSendExampleTxResponse_sequence protoreflect.FieldDescriptor +) + +func init() { + file_ibcmodule_v1_tx_proto_init() + md_MsgSendExampleTxResponse = File_ibcmodule_v1_tx_proto.Messages().ByName("MsgSendExampleTxResponse") + fd_MsgSendExampleTxResponse_sequence = md_MsgSendExampleTxResponse.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_MsgSendExampleTxResponse)(nil) + +type fastReflection_MsgSendExampleTxResponse MsgSendExampleTxResponse + +func (x *MsgSendExampleTxResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSendExampleTxResponse)(x) +} + +func (x *MsgSendExampleTxResponse) slowProtoReflect() protoreflect.Message { + mi := &file_ibcmodule_v1_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSendExampleTxResponse_messageType fastReflection_MsgSendExampleTxResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSendExampleTxResponse_messageType{} + +type fastReflection_MsgSendExampleTxResponse_messageType struct{} + +func (x fastReflection_MsgSendExampleTxResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSendExampleTxResponse)(nil) +} +func (x fastReflection_MsgSendExampleTxResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSendExampleTxResponse) +} +func (x fastReflection_MsgSendExampleTxResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSendExampleTxResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSendExampleTxResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSendExampleTxResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSendExampleTxResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSendExampleTxResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSendExampleTxResponse) New() protoreflect.Message { + return new(fastReflection_MsgSendExampleTxResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSendExampleTxResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSendExampleTxResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSendExampleTxResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_MsgSendExampleTxResponse_sequence, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSendExampleTxResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTxResponse.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTxResponse")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTxResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSendExampleTxResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTxResponse.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTxResponse")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTxResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSendExampleTxResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ibcmodule.v1.MsgSendExampleTxResponse.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTxResponse")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTxResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSendExampleTxResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTxResponse.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTxResponse")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTxResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSendExampleTxResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTxResponse.sequence": + panic(fmt.Errorf("field sequence of message ibcmodule.v1.MsgSendExampleTxResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTxResponse")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTxResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSendExampleTxResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.MsgSendExampleTxResponse.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.MsgSendExampleTxResponse")) + } + panic(fmt.Errorf("message ibcmodule.v1.MsgSendExampleTxResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSendExampleTxResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ibcmodule.v1.MsgSendExampleTxResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSendExampleTxResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSendExampleTxResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSendExampleTxResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSendExampleTxResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSendExampleTxResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSendExampleTxResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSendExampleTxResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSendExampleTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSendExampleTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ExamplePacketData protoreflect.MessageDescriptor + fd_ExamplePacketData_sender protoreflect.FieldDescriptor + fd_ExamplePacketData_some_data protoreflect.FieldDescriptor +) + +func init() { + file_ibcmodule_v1_tx_proto_init() + md_ExamplePacketData = File_ibcmodule_v1_tx_proto.Messages().ByName("ExamplePacketData") + fd_ExamplePacketData_sender = md_ExamplePacketData.Fields().ByName("sender") + fd_ExamplePacketData_some_data = md_ExamplePacketData.Fields().ByName("some_data") +} + +var _ protoreflect.Message = (*fastReflection_ExamplePacketData)(nil) + +type fastReflection_ExamplePacketData ExamplePacketData + +func (x *ExamplePacketData) ProtoReflect() protoreflect.Message { + return (*fastReflection_ExamplePacketData)(x) +} + +func (x *ExamplePacketData) slowProtoReflect() protoreflect.Message { + mi := &file_ibcmodule_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ExamplePacketData_messageType fastReflection_ExamplePacketData_messageType +var _ protoreflect.MessageType = fastReflection_ExamplePacketData_messageType{} + +type fastReflection_ExamplePacketData_messageType struct{} + +func (x fastReflection_ExamplePacketData_messageType) Zero() protoreflect.Message { + return (*fastReflection_ExamplePacketData)(nil) +} +func (x fastReflection_ExamplePacketData_messageType) New() protoreflect.Message { + return new(fastReflection_ExamplePacketData) +} +func (x fastReflection_ExamplePacketData_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ExamplePacketData +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ExamplePacketData) Descriptor() protoreflect.MessageDescriptor { + return md_ExamplePacketData +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ExamplePacketData) Type() protoreflect.MessageType { + return _fastReflection_ExamplePacketData_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ExamplePacketData) New() protoreflect.Message { + return new(fastReflection_ExamplePacketData) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ExamplePacketData) Interface() protoreflect.ProtoMessage { + return (*ExamplePacketData)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ExamplePacketData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_ExamplePacketData_sender, value) { + return + } + } + if x.SomeData != "" { + value := protoreflect.ValueOfString(x.SomeData) + if !f(fd_ExamplePacketData_some_data, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ExamplePacketData) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ibcmodule.v1.ExamplePacketData.sender": + return x.Sender != "" + case "ibcmodule.v1.ExamplePacketData.some_data": + return x.SomeData != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.ExamplePacketData")) + } + panic(fmt.Errorf("message ibcmodule.v1.ExamplePacketData does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExamplePacketData) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ibcmodule.v1.ExamplePacketData.sender": + x.Sender = "" + case "ibcmodule.v1.ExamplePacketData.some_data": + x.SomeData = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.ExamplePacketData")) + } + panic(fmt.Errorf("message ibcmodule.v1.ExamplePacketData does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ExamplePacketData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ibcmodule.v1.ExamplePacketData.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "ibcmodule.v1.ExamplePacketData.some_data": + value := x.SomeData + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.ExamplePacketData")) + } + panic(fmt.Errorf("message ibcmodule.v1.ExamplePacketData does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExamplePacketData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ibcmodule.v1.ExamplePacketData.sender": + x.Sender = value.Interface().(string) + case "ibcmodule.v1.ExamplePacketData.some_data": + x.SomeData = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.ExamplePacketData")) + } + panic(fmt.Errorf("message ibcmodule.v1.ExamplePacketData does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExamplePacketData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.ExamplePacketData.sender": + panic(fmt.Errorf("field sender of message ibcmodule.v1.ExamplePacketData is not mutable")) + case "ibcmodule.v1.ExamplePacketData.some_data": + panic(fmt.Errorf("field some_data of message ibcmodule.v1.ExamplePacketData is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.ExamplePacketData")) + } + panic(fmt.Errorf("message ibcmodule.v1.ExamplePacketData does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ExamplePacketData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.ExamplePacketData.sender": + return protoreflect.ValueOfString("") + case "ibcmodule.v1.ExamplePacketData.some_data": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.ExamplePacketData")) + } + panic(fmt.Errorf("message ibcmodule.v1.ExamplePacketData does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ExamplePacketData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in ibcmodule.v1.ExamplePacketData", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ExamplePacketData) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExamplePacketData) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ExamplePacketData) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ExamplePacketData) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ExamplePacketData) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SomeData) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ExamplePacketData) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.SomeData) > 0 { + i -= len(x.SomeData) + copy(dAtA[i:], x.SomeData) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SomeData))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ExamplePacketData) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExamplePacketData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExamplePacketData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SomeData", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SomeData = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Acknowledgement protoreflect.MessageDescriptor + fd_Acknowledgement_result protoreflect.FieldDescriptor + fd_Acknowledgement_error protoreflect.FieldDescriptor +) + +func init() { + file_ibcmodule_v1_tx_proto_init() + md_Acknowledgement = File_ibcmodule_v1_tx_proto.Messages().ByName("Acknowledgement") + fd_Acknowledgement_result = md_Acknowledgement.Fields().ByName("result") + fd_Acknowledgement_error = md_Acknowledgement.Fields().ByName("error") +} + +var _ protoreflect.Message = (*fastReflection_Acknowledgement)(nil) + +type fastReflection_Acknowledgement Acknowledgement + +func (x *Acknowledgement) ProtoReflect() protoreflect.Message { + return (*fastReflection_Acknowledgement)(x) +} + +func (x *Acknowledgement) slowProtoReflect() protoreflect.Message { + mi := &file_ibcmodule_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Acknowledgement_messageType fastReflection_Acknowledgement_messageType +var _ protoreflect.MessageType = fastReflection_Acknowledgement_messageType{} + +type fastReflection_Acknowledgement_messageType struct{} + +func (x fastReflection_Acknowledgement_messageType) Zero() protoreflect.Message { + return (*fastReflection_Acknowledgement)(nil) +} +func (x fastReflection_Acknowledgement_messageType) New() protoreflect.Message { + return new(fastReflection_Acknowledgement) +} +func (x fastReflection_Acknowledgement_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Acknowledgement +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Acknowledgement) Descriptor() protoreflect.MessageDescriptor { + return md_Acknowledgement +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Acknowledgement) Type() protoreflect.MessageType { + return _fastReflection_Acknowledgement_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Acknowledgement) New() protoreflect.Message { + return new(fastReflection_Acknowledgement) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Acknowledgement) Interface() protoreflect.ProtoMessage { + return (*Acknowledgement)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Acknowledgement) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Response != nil { + switch o := x.Response.(type) { + case *Acknowledgement_Result: + v := o.Result + value := protoreflect.ValueOfBytes(v) + if !f(fd_Acknowledgement_result, value) { + return + } + case *Acknowledgement_Error: + v := o.Error + value := protoreflect.ValueOfString(v) + if !f(fd_Acknowledgement_error, value) { + return + } + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Acknowledgement) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "ibcmodule.v1.Acknowledgement.result": + if x.Response == nil { + return false + } else if _, ok := x.Response.(*Acknowledgement_Result); ok { + return true + } else { + return false + } + case "ibcmodule.v1.Acknowledgement.error": + if x.Response == nil { + return false + } else if _, ok := x.Response.(*Acknowledgement_Error); ok { + return true + } else { + return false + } + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.Acknowledgement")) + } + panic(fmt.Errorf("message ibcmodule.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Acknowledgement) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "ibcmodule.v1.Acknowledgement.result": + x.Response = nil + case "ibcmodule.v1.Acknowledgement.error": + x.Response = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.Acknowledgement")) + } + panic(fmt.Errorf("message ibcmodule.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Acknowledgement) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "ibcmodule.v1.Acknowledgement.result": + if x.Response == nil { + return protoreflect.ValueOfBytes(nil) + } else if v, ok := x.Response.(*Acknowledgement_Result); ok { + return protoreflect.ValueOfBytes(v.Result) + } else { + return protoreflect.ValueOfBytes(nil) + } + case "ibcmodule.v1.Acknowledgement.error": + if x.Response == nil { + return protoreflect.ValueOfString("") + } else if v, ok := x.Response.(*Acknowledgement_Error); ok { + return protoreflect.ValueOfString(v.Error) + } else { + return protoreflect.ValueOfString("") + } + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.Acknowledgement")) + } + panic(fmt.Errorf("message ibcmodule.v1.Acknowledgement does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Acknowledgement) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "ibcmodule.v1.Acknowledgement.result": + cv := value.Bytes() + x.Response = &Acknowledgement_Result{Result: cv} + case "ibcmodule.v1.Acknowledgement.error": + cv := value.Interface().(string) + x.Response = &Acknowledgement_Error{Error: cv} + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.Acknowledgement")) + } + panic(fmt.Errorf("message ibcmodule.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Acknowledgement) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.Acknowledgement.result": + panic(fmt.Errorf("field result of message ibcmodule.v1.Acknowledgement is not mutable")) + case "ibcmodule.v1.Acknowledgement.error": + panic(fmt.Errorf("field error of message ibcmodule.v1.Acknowledgement is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.Acknowledgement")) + } + panic(fmt.Errorf("message ibcmodule.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Acknowledgement) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "ibcmodule.v1.Acknowledgement.result": + return protoreflect.ValueOfBytes(nil) + case "ibcmodule.v1.Acknowledgement.error": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: ibcmodule.v1.Acknowledgement")) + } + panic(fmt.Errorf("message ibcmodule.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Acknowledgement) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + case "ibcmodule.v1.Acknowledgement.response": + if x.Response == nil { + return nil + } + switch x.Response.(type) { + case *Acknowledgement_Result: + return x.Descriptor().Fields().ByName("result") + case *Acknowledgement_Error: + return x.Descriptor().Fields().ByName("error") + } + default: + panic(fmt.Errorf("%s is not a oneof field in ibcmodule.v1.Acknowledgement", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Acknowledgement) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Acknowledgement) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Acknowledgement) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Acknowledgement) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Acknowledgement) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + switch x := x.Response.(type) { + case *Acknowledgement_Result: + if x == nil { + break + } + l = len(x.Result) + n += 2 + l + runtime.Sov(uint64(l)) + case *Acknowledgement_Error: + if x == nil { + break + } + l = len(x.Error) + n += 2 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Acknowledgement) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + switch x := x.Response.(type) { + case *Acknowledgement_Result: + i -= len(x.Result) + copy(dAtA[i:], x.Result) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Result))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + case *Acknowledgement_Error: + i -= len(x.Error) + copy(dAtA[i:], x.Error) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Acknowledgement) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Acknowledgement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Acknowledgement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 21: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + x.Response = &Acknowledgement_Result{v} + iNdEx = postIndex + case 22: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Response = &Acknowledgement_Error{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: ibcmodule/v1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgSendExampleTx defines the payload for Msg/SendExampleTx +type MsgSendExampleTx struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SourcePort string `protobuf:"bytes,2,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"` + SourceChannel string `protobuf:"bytes,3,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,4,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + SomeData string `protobuf:"bytes,5,opt,name=some_data,json=someData,proto3" json:"some_data,omitempty"` +} + +func (x *MsgSendExampleTx) Reset() { + *x = MsgSendExampleTx{} + if protoimpl.UnsafeEnabled { + mi := &file_ibcmodule_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSendExampleTx) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSendExampleTx) ProtoMessage() {} + +// Deprecated: Use MsgSendExampleTx.ProtoReflect.Descriptor instead. +func (*MsgSendExampleTx) Descriptor() ([]byte, []int) { + return file_ibcmodule_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgSendExampleTx) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgSendExampleTx) GetSourcePort() string { + if x != nil { + return x.SourcePort + } + return "" +} + +func (x *MsgSendExampleTx) GetSourceChannel() string { + if x != nil { + return x.SourceChannel + } + return "" +} + +func (x *MsgSendExampleTx) GetTimeoutTimestamp() uint64 { + if x != nil { + return x.TimeoutTimestamp + } + return 0 +} + +func (x *MsgSendExampleTx) GetSomeData() string { + if x != nil { + return x.SomeData + } + return "" +} + +// MsgSendExampleTxResponse defines the response. +type MsgSendExampleTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *MsgSendExampleTxResponse) Reset() { + *x = MsgSendExampleTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ibcmodule_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSendExampleTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSendExampleTxResponse) ProtoMessage() {} + +// Deprecated: Use MsgSendExampleTxResponse.ProtoReflect.Descriptor instead. +func (*MsgSendExampleTxResponse) Descriptor() ([]byte, []int) { + return file_ibcmodule_v1_tx_proto_rawDescGZIP(), []int{1} +} + +func (x *MsgSendExampleTxResponse) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +// ExamplePacketData +type ExamplePacketData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SomeData string `protobuf:"bytes,2,opt,name=some_data,json=someData,proto3" json:"some_data,omitempty"` +} + +func (x *ExamplePacketData) Reset() { + *x = ExamplePacketData{} + if protoimpl.UnsafeEnabled { + mi := &file_ibcmodule_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExamplePacketData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExamplePacketData) ProtoMessage() {} + +// Deprecated: Use ExamplePacketData.ProtoReflect.Descriptor instead. +func (*ExamplePacketData) Descriptor() ([]byte, []int) { + return file_ibcmodule_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *ExamplePacketData) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *ExamplePacketData) GetSomeData() string { + if x != nil { + return x.SomeData + } + return "" +} + +// Acknowledgement +type Acknowledgement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // response + // + // Types that are assignable to Response: + // + // *Acknowledgement_Result + // *Acknowledgement_Error + Response isAcknowledgement_Response `protobuf_oneof:"response"` +} + +func (x *Acknowledgement) Reset() { + *x = Acknowledgement{} + if protoimpl.UnsafeEnabled { + mi := &file_ibcmodule_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Acknowledgement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Acknowledgement) ProtoMessage() {} + +// Deprecated: Use Acknowledgement.ProtoReflect.Descriptor instead. +func (*Acknowledgement) Descriptor() ([]byte, []int) { + return file_ibcmodule_v1_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *Acknowledgement) GetResponse() isAcknowledgement_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *Acknowledgement) GetResult() []byte { + if x, ok := x.GetResponse().(*Acknowledgement_Result); ok { + return x.Result + } + return nil +} + +func (x *Acknowledgement) GetError() string { + if x, ok := x.GetResponse().(*Acknowledgement_Error); ok { + return x.Error + } + return "" +} + +type isAcknowledgement_Response interface { + isAcknowledgement_Response() +} + +type Acknowledgement_Result struct { + Result []byte `protobuf:"bytes,21,opt,name=result,proto3,oneof"` +} + +type Acknowledgement_Error struct { + Error string `protobuf:"bytes,22,opt,name=error,proto3,oneof"` +} + +func (*Acknowledgement_Result) isAcknowledgement_Response() {} + +func (*Acknowledgement_Error) isAcknowledgement_Response() {} + +var File_ibcmodule_v1_tx_proto protoreflect.FileDescriptor + +var file_ibcmodule_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, + 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, + 0x72, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x3a, 0x0f, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x45, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x3a, 0x04, 0x88, 0xa0, + 0x1f, 0x00, 0x22, 0x48, 0x0a, 0x11, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x4f, 0x0a, 0x0f, + 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x18, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0c, 0x48, + 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x65, 0x0a, + 0x03, 0x4d, 0x73, 0x67, 0x12, 0x57, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x54, 0x78, 0x12, 0x1e, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x54, 0x78, 0x1a, 0x26, 0x2e, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, + 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xad, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x62, 0x63, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x73, 0x70, 0x61, 0x77, + 0x6e, 0x2f, 0x73, 0x69, 0x6d, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x62, 0x63, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x62, 0x63, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x49, 0x62, + 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x49, 0x62, 0x63, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x49, 0x62, 0x63, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x49, 0x62, 0x63, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ibcmodule_v1_tx_proto_rawDescOnce sync.Once + file_ibcmodule_v1_tx_proto_rawDescData = file_ibcmodule_v1_tx_proto_rawDesc +) + +func file_ibcmodule_v1_tx_proto_rawDescGZIP() []byte { + file_ibcmodule_v1_tx_proto_rawDescOnce.Do(func() { + file_ibcmodule_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_ibcmodule_v1_tx_proto_rawDescData) + }) + return file_ibcmodule_v1_tx_proto_rawDescData +} + +var file_ibcmodule_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_ibcmodule_v1_tx_proto_goTypes = []interface{}{ + (*MsgSendExampleTx)(nil), // 0: ibcmodule.v1.MsgSendExampleTx + (*MsgSendExampleTxResponse)(nil), // 1: ibcmodule.v1.MsgSendExampleTxResponse + (*ExamplePacketData)(nil), // 2: ibcmodule.v1.ExamplePacketData + (*Acknowledgement)(nil), // 3: ibcmodule.v1.Acknowledgement +} +var file_ibcmodule_v1_tx_proto_depIdxs = []int32{ + 0, // 0: ibcmodule.v1.Msg.SendExampleTx:input_type -> ibcmodule.v1.MsgSendExampleTx + 1, // 1: ibcmodule.v1.Msg.SendExampleTx:output_type -> ibcmodule.v1.MsgSendExampleTxResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ibcmodule_v1_tx_proto_init() } +func file_ibcmodule_v1_tx_proto_init() { + if File_ibcmodule_v1_tx_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ibcmodule_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSendExampleTx); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ibcmodule_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSendExampleTxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ibcmodule_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExamplePacketData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ibcmodule_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Acknowledgement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_ibcmodule_v1_tx_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*Acknowledgement_Result)(nil), + (*Acknowledgement_Error)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ibcmodule_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ibcmodule_v1_tx_proto_goTypes, + DependencyIndexes: file_ibcmodule_v1_tx_proto_depIdxs, + MessageInfos: file_ibcmodule_v1_tx_proto_msgTypes, + }.Build() + File_ibcmodule_v1_tx_proto = out.File + file_ibcmodule_v1_tx_proto_rawDesc = nil + file_ibcmodule_v1_tx_proto_goTypes = nil + file_ibcmodule_v1_tx_proto_depIdxs = nil +} diff --git a/simapp/api/ibcmodule/v1/tx_grpc.pb.go b/simapp/api/ibcmodule/v1/tx_grpc.pb.go new file mode 100644 index 00000000..4fe1c7bc --- /dev/null +++ b/simapp/api/ibcmodule/v1/tx_grpc.pb.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: ibcmodule/v1/tx.proto + +package ibcmodulev1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_SendExampleTx_FullMethodName = "/ibcmodule.v1.Msg/SendExampleTx" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MsgClient interface { + // SendExampleTx defines a rpc handler for MsgSendExampleTx. + SendExampleTx(ctx context.Context, in *MsgSendExampleTx, opts ...grpc.CallOption) (*MsgSendExampleTxResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SendExampleTx(ctx context.Context, in *MsgSendExampleTx, opts ...grpc.CallOption) (*MsgSendExampleTxResponse, error) { + out := new(MsgSendExampleTxResponse) + err := c.cc.Invoke(ctx, Msg_SendExampleTx_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +type MsgServer interface { + // SendExampleTx defines a rpc handler for MsgSendExampleTx. + SendExampleTx(context.Context, *MsgSendExampleTx) (*MsgSendExampleTxResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) SendExampleTx(context.Context, *MsgSendExampleTx) (*MsgSendExampleTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendExampleTx not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_SendExampleTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSendExampleTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SendExampleTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SendExampleTx_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SendExampleTx(ctx, req.(*MsgSendExampleTx)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ibcmodule.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SendExampleTx", + Handler: _Msg_SendExampleTx_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibcmodule/v1/tx.proto", +} diff --git a/simapp/embed.go b/simapp/embed.go index 96d55bc7..55dbccab 100644 --- a/simapp/embed.go +++ b/simapp/embed.go @@ -14,7 +14,7 @@ var SimAppFS embed.FS //go:embed interchaintest/* var ICTestFS embed.FS -//go:embed proto/example/* proto/ibcmiddleware/* +//go:embed proto/* var ProtoModuleFS embed.FS //go:embed x/* diff --git a/simapp/proto/ibcmodule/module/v1/module.proto b/simapp/proto/ibcmodule/module/v1/module.proto new file mode 100644 index 00000000..9752ecda --- /dev/null +++ b/simapp/proto/ibcmodule/module/v1/module.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package ibcmodule.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the app config object of the module. +// Learn more: https://docs.cosmos.network/main/building-modules/depinject +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import : "github.com/rollchains/spawn/simapp" + }; +} diff --git a/simapp/proto/ibcmodule/v1/genesis.proto b/simapp/proto/ibcmodule/v1/genesis.proto new file mode 100644 index 00000000..9a6fb018 --- /dev/null +++ b/simapp/proto/ibcmodule/v1/genesis.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package ibcmodule.v1; + +option go_package = "github.com/rollchains/spawn/simapp/x/ibcmodule/types"; + +import "gogoproto/gogo.proto"; + +// GenesisState defines the modules genesis state. +message GenesisState { + string port_id = 1; +} diff --git a/simapp/proto/ibcmodule/v1/query.proto b/simapp/proto/ibcmodule/v1/query.proto new file mode 100644 index 00000000..7b41fed9 --- /dev/null +++ b/simapp/proto/ibcmodule/v1/query.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package ibcmodule.v1; + +option go_package = "github.com/rollchains/spawn/simapp/x/ibcmodule/types"; + +import "gogoproto/gogo.proto"; diff --git a/simapp/proto/ibcmodule/v1/tx.proto b/simapp/proto/ibcmodule/v1/tx.proto new file mode 100644 index 00000000..99ebf5e7 --- /dev/null +++ b/simapp/proto/ibcmodule/v1/tx.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; + +package ibcmodule.v1; + +option go_package = "github.com/rollchains/spawn/simapp/x/ibcmodule/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/msg/v1/msg.proto"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // SendExampleTx defines a rpc handler for MsgSendExampleTx. + rpc SendExampleTx(MsgSendExampleTx) returns (MsgSendExampleTxResponse); +} + +// MsgSendExampleTx defines the payload for Msg/SendExampleTx +message MsgSendExampleTx { + option (cosmos.msg.v1.signer) = "sender"; + + option (gogoproto.goproto_getters) = false; + + string sender = 1; + + string source_port = 2; + string source_channel = 3; + uint64 timeout_timestamp = 4; + + string some_data = 5; + } + +// MsgSendExampleTxResponse defines the response. +message MsgSendExampleTxResponse { + option (gogoproto.goproto_getters) = false; + + uint64 sequence = 1; +} + + +// ExamplePacketData +message ExamplePacketData { + string sender = 1; + string some_data = 2; +} + +// Acknowledgement +message Acknowledgement { + // response + oneof response { + bytes result = 21; + string error = 22; + } +} diff --git a/simapp/x/example/types/genesis.pb.go b/simapp/x/example/types/genesis.pb.go index aaf2a956..17aa6289 100644 --- a/simapp/x/example/types/genesis.pb.go +++ b/simapp/x/example/types/genesis.pb.go @@ -26,7 +26,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the module genesis state type GenesisState struct { - // Params defines all the paramaters of the module. + // Params defines all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } @@ -122,7 +122,7 @@ func init() { func init() { proto.RegisterFile("example/v1/genesis.proto", fileDescriptor_b873a20abde33944) } var fileDescriptor_b873a20abde33944 = []byte{ - // 253 bytes of a gzipped FileDescriptorProto + // 259 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x48, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0xca, 0xe8, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, @@ -133,12 +133,13 @@ var fileDescriptor_b873a20abde33944 = []byte{ 0x54, 0x9d, 0x92, 0x0b, 0x17, 0x1b, 0x44, 0x5c, 0x48, 0x96, 0x8b, 0xab, 0x38, 0x3f, 0x37, 0x35, 0xbe, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x23, 0x88, 0x13, 0x24, 0x12, 0x06, 0x12, 0xb0, 0x92, 0x9e, 0xb1, 0x40, 0x9e, 0xe1, 0xc5, 0x02, 0x79, 0xc6, 0xae, 0xe7, 0x1b, - 0xb4, 0xf8, 0x60, 0xde, 0x80, 0x98, 0xe2, 0xe4, 0x76, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, + 0xb4, 0xf8, 0x60, 0xde, 0x80, 0x98, 0xe2, 0xe4, 0x73, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, - 0x72, 0x0c, 0x51, 0x3a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x45, - 0xf9, 0x39, 0x39, 0xc9, 0x19, 0x89, 0x99, 0x79, 0xc5, 0xfa, 0xc5, 0x99, 0xb9, 0x89, 0x05, 0x05, - 0xfa, 0x15, 0xfa, 0x30, 0x83, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xde, 0x32, 0x06, - 0x04, 0x00, 0x00, 0xff, 0xff, 0xaf, 0xe7, 0xf0, 0x32, 0x27, 0x01, 0x00, 0x00, + 0x72, 0x0c, 0x51, 0x46, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x45, + 0xf9, 0x39, 0x39, 0xc9, 0x19, 0x89, 0x99, 0x79, 0xc5, 0xfa, 0xc5, 0x05, 0x89, 0xe5, 0x79, 0xfa, + 0xc5, 0x99, 0xb9, 0x89, 0x05, 0x05, 0xfa, 0x15, 0xfa, 0x30, 0xe3, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, + 0x93, 0xd8, 0xc0, 0x9e, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x28, 0x5b, 0x6c, 0x2d, + 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/simapp/x/example/types/query.pb.go b/simapp/x/example/types/query.pb.go index 761d7883..7ad5cc2b 100644 --- a/simapp/x/example/types/query.pb.go +++ b/simapp/x/example/types/query.pb.go @@ -119,24 +119,24 @@ func init() { func init() { proto.RegisterFile("example/v1/query.proto", fileDescriptor_b8295460cd91ceef) } var fileDescriptor_b8295460cd91ceef = []byte{ - // 259 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0xc4, 0x30, - 0x14, 0x45, 0x1b, 0xc1, 0x2e, 0xe2, 0x2e, 0x0e, 0x32, 0x14, 0x89, 0xd2, 0x95, 0x88, 0x24, 0xcc, - 0xf8, 0x05, 0xba, 0x70, 0xad, 0x2e, 0xdd, 0x65, 0x86, 0x47, 0x27, 0xd0, 0xe6, 0x65, 0xfa, 0xd2, - 0x61, 0x66, 0xeb, 0x17, 0x08, 0xfe, 0x94, 0xcb, 0x82, 0x1b, 0x97, 0xd2, 0xfa, 0x21, 0x62, 0x5b, - 0xb4, 0x22, 0x6e, 0xef, 0x3d, 0x9c, 0x9b, 0x3c, 0x7e, 0x04, 0x5b, 0x53, 0xf8, 0x1c, 0xf4, 0x66, - 0xa6, 0xd7, 0x15, 0x94, 0x3b, 0xe5, 0x4b, 0x0c, 0x28, 0xf8, 0x90, 0xab, 0xcd, 0x2c, 0x39, 0xce, - 0x10, 0xb3, 0x1c, 0xb4, 0xf1, 0x56, 0x1b, 0xe7, 0x30, 0x98, 0x60, 0xd1, 0x51, 0x4f, 0x26, 0xd3, - 0x91, 0x21, 0x03, 0x07, 0x64, 0x87, 0x26, 0x9d, 0x70, 0x71, 0xf7, 0xa5, 0xbc, 0x35, 0xa5, 0x29, - 0xe8, 0x1e, 0xd6, 0x15, 0x50, 0x48, 0xaf, 0xf8, 0xe1, 0xaf, 0x94, 0x3c, 0x3a, 0x02, 0x71, 0xce, - 0x63, 0xdf, 0x25, 0x53, 0x76, 0xca, 0xce, 0x0e, 0xe6, 0x42, 0xfd, 0xbc, 0x40, 0x0d, 0xec, 0x40, - 0xcc, 0x1d, 0xdf, 0xef, 0x14, 0x02, 0x78, 0xdc, 0x57, 0x42, 0x8e, 0xf1, 0xbf, 0xab, 0xc9, 0xc9, - 0xbf, 0x7d, 0xbf, 0x9f, 0x26, 0x8f, 0xaf, 0x1f, 0xcf, 0x7b, 0x13, 0x21, 0xf4, 0xe8, 0x3f, 0xfd, - 0xde, 0xf5, 0xcd, 0x4b, 0x23, 0x59, 0xdd, 0x48, 0xf6, 0xde, 0x48, 0xf6, 0xd4, 0xca, 0xa8, 0x6e, - 0x65, 0xf4, 0xd6, 0xca, 0xe8, 0xe1, 0x22, 0xb3, 0x61, 0x55, 0x2d, 0xd4, 0x12, 0x0b, 0x5d, 0x62, - 0x9e, 0x2f, 0x57, 0xc6, 0x3a, 0xd2, 0x64, 0x0b, 0xe3, 0xbd, 0xde, 0x7e, 0xbb, 0xc2, 0xce, 0x03, - 0x2d, 0xe2, 0xee, 0x2e, 0x97, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x23, 0xd5, 0x49, 0x75, - 0x01, 0x00, 0x00, + // 263 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x31, 0x4b, 0xc4, 0x30, + 0x18, 0x86, 0x1b, 0xc1, 0x0e, 0x71, 0x8b, 0x87, 0x1c, 0x45, 0xa2, 0x74, 0x12, 0x87, 0x84, 0xab, + 0xbf, 0x40, 0x67, 0x07, 0x75, 0x74, 0xcb, 0x1d, 0x1f, 0xbd, 0x40, 0x9b, 0x7c, 0xd7, 0x2f, 0x3d, + 0xef, 0x56, 0x7f, 0x81, 0xe0, 0x9f, 0x72, 0x3c, 0x70, 0x71, 0x94, 0xd6, 0x1f, 0x22, 0xb6, 0x45, + 0x2b, 0xe2, 0xfa, 0xbe, 0x0f, 0xcf, 0x9b, 0x7c, 0xfc, 0x08, 0x36, 0xa6, 0xc4, 0x02, 0xf4, 0x7a, + 0xa6, 0x57, 0x35, 0x54, 0x5b, 0x85, 0x95, 0x0f, 0x5e, 0xf0, 0x21, 0x57, 0xeb, 0x59, 0x72, 0x9c, + 0x7b, 0x9f, 0x17, 0xa0, 0x0d, 0x5a, 0x6d, 0x9c, 0xf3, 0xc1, 0x04, 0xeb, 0x1d, 0xf5, 0x64, 0x32, + 0x1d, 0x19, 0x72, 0x70, 0x40, 0x76, 0x68, 0xd2, 0x09, 0x17, 0xb7, 0x5f, 0xca, 0x1b, 0x53, 0x99, + 0x92, 0xee, 0x60, 0x55, 0x03, 0x85, 0xf4, 0x92, 0x1f, 0xfe, 0x4a, 0x09, 0xbd, 0x23, 0x10, 0xe7, + 0x3c, 0xc6, 0x2e, 0x99, 0xb2, 0x53, 0x76, 0x76, 0x90, 0x09, 0xf5, 0xf3, 0x02, 0x35, 0xb0, 0x03, + 0x91, 0x39, 0xbe, 0xdf, 0x29, 0x04, 0xf0, 0xb8, 0xaf, 0x84, 0x1c, 0xe3, 0x7f, 0x57, 0x93, 0x93, + 0x7f, 0xfb, 0x7e, 0x3f, 0x4d, 0x1e, 0x5f, 0x3f, 0x9e, 0xf7, 0x26, 0x42, 0xe8, 0xd1, 0x7f, 0xfa, + 0xbd, 0xab, 0xeb, 0x97, 0x46, 0xb2, 0x5d, 0x23, 0xd9, 0x7b, 0x23, 0xd9, 0x53, 0x2b, 0xa3, 0x5d, + 0x2b, 0xa3, 0xb7, 0x56, 0x46, 0xf7, 0x59, 0x6e, 0xc3, 0xb2, 0x9e, 0xab, 0x85, 0x2f, 0x75, 0xe5, + 0x8b, 0x62, 0xb1, 0x34, 0xd6, 0x91, 0x26, 0x34, 0x0f, 0x4e, 0x93, 0x2d, 0x0d, 0xa2, 0xde, 0x7c, + 0x1b, 0xc3, 0x16, 0x81, 0xe6, 0x71, 0x77, 0x9d, 0x8b, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5e, + 0xd2, 0xfa, 0x28, 0x7b, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/simapp/x/example/types/state.pb.go b/simapp/x/example/types/state.pb.go index 6fead63f..0ae42647 100644 --- a/simapp/x/example/types/state.pb.go +++ b/simapp/x/example/types/state.pb.go @@ -82,7 +82,7 @@ func init() { func init() { proto.RegisterFile("example/v1/state.proto", fileDescriptor_a06572813783339b) } var fileDescriptor_a06572813783339b = []byte{ - // 214 bytes of a gzipped FileDescriptorProto + // 220 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0x2e, 0x49, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x8a, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, @@ -91,12 +91,12 @@ var fileDescriptor_a06572813783339b = []byte{ 0xe6, 0x95, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0xc1, 0xb8, 0x42, 0x62, 0x5c, 0x6c, 0x89, 0xb9, 0x60, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x96, 0x20, 0x28, 0xcf, 0x4a, 0xfe, 0xd3, 0xbc, 0xcb, 0x7d, 0xcc, 0x92, 0x5c, 0x9c, 0x70, 0x9d, 0x42, 0x5c, 0x30, 0xa5, 0x02, 0x8c, 0x12, 0x8c, 0x4e, - 0x6e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, - 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x93, 0x9e, 0x59, 0x92, + 0x3e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, + 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x94, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x94, 0x9f, 0x93, 0x93, 0x9c, 0x91, 0x98, 0x99, - 0x57, 0xac, 0x5f, 0x9c, 0x99, 0x9b, 0x58, 0x50, 0xa0, 0x5f, 0xa1, 0x0f, 0xf3, 0x57, 0x49, 0x65, - 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0xc1, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, 0x3b, - 0x54, 0x2c, 0xef, 0x00, 0x00, 0x00, + 0x57, 0xac, 0x5f, 0x5c, 0x90, 0x58, 0x9e, 0xa7, 0x5f, 0x9c, 0x99, 0x9b, 0x58, 0x50, 0xa0, 0x5f, + 0xa1, 0x0f, 0xf3, 0x5d, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0xd9, 0xc6, 0x80, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xb9, 0x5c, 0x1a, 0x25, 0xf5, 0x00, 0x00, 0x00, } func (m *ExampleData) Marshal() (dAtA []byte, err error) { diff --git a/simapp/x/example/types/tx.pb.go b/simapp/x/example/types/tx.pb.go index 8528591d..75f958f0 100644 --- a/simapp/x/example/types/tx.pb.go +++ b/simapp/x/example/types/tx.pb.go @@ -137,7 +137,7 @@ func init() { func init() { proto.RegisterFile("example/v1/tx.proto", fileDescriptor_6f2888efd21b80b6) } var fileDescriptor_6f2888efd21b80b6 = []byte{ - // 327 bytes of a gzipped FileDescriptorProto + // 333 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4e, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x0a, 0xea, 0x95, 0x19, 0x4a, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb, 0xe7, @@ -153,12 +153,12 @@ var fileDescriptor_6f2888efd21b80b6 = []byte{ 0x30, 0x41, 0x49, 0x92, 0x4b, 0x1c, 0xcd, 0x31, 0x41, 0xa9, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x46, 0x71, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0x01, 0x5c, 0x3c, 0x28, 0x6e, 0x95, 0x46, 0xb6, 0x03, 0x4d, 0xaf, 0x94, 0x32, 0x1e, 0x49, 0x98, 0xc1, 0x52, 0xac, 0x0d, 0xcf, 0x37, 0x68, 0x31, - 0x3a, 0xb9, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, - 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x4e, 0x7a, 0x66, + 0x3a, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, + 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x51, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x51, 0x7e, 0x4e, 0x4e, 0x72, 0x46, 0x62, - 0x66, 0x5e, 0xb1, 0x7e, 0x71, 0x66, 0x6e, 0x62, 0x41, 0x81, 0x7e, 0x85, 0x3e, 0x2c, 0x32, 0x4a, - 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xe1, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x52, - 0xe6, 0x9b, 0xac, 0xde, 0x01, 0x00, 0x00, + 0x66, 0x5e, 0xb1, 0x7e, 0x71, 0x41, 0x62, 0x79, 0x9e, 0x7e, 0x71, 0x66, 0x6e, 0x62, 0x41, 0x81, + 0x7e, 0x85, 0x3e, 0x2c, 0x4a, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xa1, 0x6b, 0x0c, + 0x08, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xee, 0x9d, 0xe3, 0xe4, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/simapp/x/ibcmiddleware/keeper/keeper.go b/simapp/x/ibcmiddleware/keeper/keeper.go index b9bae4bb..69e78b5f 100644 --- a/simapp/x/ibcmiddleware/keeper/keeper.go +++ b/simapp/x/ibcmiddleware/keeper/keeper.go @@ -23,7 +23,7 @@ type Keeper struct { ics4Wrapper porttypes.ICS4Wrapper } -// NewKeeper creates a new swap Keeper instance. +// NewKeeper creates a new Keeper instance. func NewKeeper( cdc codec.BinaryCodec, msgServiceRouter *baseapp.MsgServiceRouter, diff --git a/simapp/x/ibcmiddleware/types/genesis.pb.go b/simapp/x/ibcmiddleware/types/genesis.pb.go index 44ad10f7..065c36bb 100644 --- a/simapp/x/ibcmiddleware/types/genesis.pb.go +++ b/simapp/x/ibcmiddleware/types/genesis.pb.go @@ -67,18 +67,18 @@ func init() { func init() { proto.RegisterFile("ibcmiddleware/v1/genesis.proto", fileDescriptor_d0bd9c2fd79b48cf) } var fileDescriptor_d0bd9c2fd79b48cf = []byte{ - // 161 bytes of a gzipped FileDescriptorProto + // 167 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x4c, 0x4a, 0xce, 0xcd, 0x4c, 0x49, 0xc9, 0x49, 0x2d, 0x4f, 0x2c, 0x4a, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x40, 0x91, 0xd7, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xea, 0x83, 0x58, 0x10, 0x75, 0x4a, 0x7c, - 0x5c, 0x3c, 0xee, 0x10, 0x8d, 0xc1, 0x25, 0x89, 0x25, 0xa9, 0x4e, 0x3e, 0x27, 0x1e, 0xc9, 0x31, + 0x5c, 0x3c, 0xee, 0x10, 0x8d, 0xc1, 0x25, 0x89, 0x25, 0xa9, 0x4e, 0x41, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, - 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x94, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, - 0x9f, 0xab, 0x5f, 0x94, 0x9f, 0x93, 0x93, 0x9c, 0x91, 0x98, 0x99, 0x57, 0xac, 0x5f, 0x9c, 0x99, - 0x9b, 0x58, 0x50, 0xa0, 0x5f, 0xa1, 0x8f, 0xea, 0xa0, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, - 0xb0, 0x25, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xe6, 0xf3, 0x9b, 0xae, 0x00, 0x00, - 0x00, + 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x91, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, + 0x9f, 0xab, 0x5f, 0x94, 0x9f, 0x93, 0x93, 0x9c, 0x91, 0x98, 0x99, 0x57, 0xac, 0x5f, 0x5c, 0x90, + 0x58, 0x9e, 0xa7, 0x5f, 0x9c, 0x99, 0x9b, 0x58, 0x50, 0xa0, 0x5f, 0xa1, 0x8f, 0xea, 0xac, 0x92, + 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0x55, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbd, + 0xcb, 0xb6, 0x55, 0xb4, 0x00, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/simapp/x/ibcmiddleware/types/query.pb.go b/simapp/x/ibcmiddleware/types/query.pb.go index 247623ea..5e5aa12c 100644 --- a/simapp/x/ibcmiddleware/types/query.pb.go +++ b/simapp/x/ibcmiddleware/types/query.pb.go @@ -24,15 +24,15 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("ibcmiddleware/v1/query.proto", fileDescriptor_c2f2f87cfbe44411) } var fileDescriptor_c2f2f87cfbe44411 = []byte{ - // 147 bytes of a gzipped FileDescriptorProto + // 153 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc9, 0x4c, 0x4a, 0xce, 0xcd, 0x4c, 0x49, 0xc9, 0x49, 0x2d, 0x4f, 0x2c, 0x4a, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x40, 0x91, 0xd5, 0x2b, 0x33, 0x94, - 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xea, 0x83, 0x58, 0x10, 0x75, 0x4e, 0x3e, 0x27, 0x1e, + 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xea, 0x83, 0x58, 0x10, 0x75, 0x4e, 0x41, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, - 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x94, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, + 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x91, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x94, 0x9f, 0x93, 0x93, 0x9c, 0x91, 0x98, 0x99, 0x57, 0xac, 0x5f, - 0x9c, 0x99, 0x9b, 0x58, 0x50, 0xa0, 0x5f, 0xa1, 0x8f, 0x6a, 0x7d, 0x49, 0x65, 0x41, 0x6a, 0x71, - 0x12, 0x1b, 0xd8, 0x50, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x66, 0xc4, 0x01, 0x1f, 0x9c, - 0x00, 0x00, 0x00, + 0x5c, 0x90, 0x58, 0x9e, 0xa7, 0x5f, 0x9c, 0x99, 0x9b, 0x58, 0x50, 0xa0, 0x5f, 0xa1, 0x8f, 0xea, + 0x88, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xd1, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x87, 0x4e, 0xd1, 0xd5, 0xa2, 0x00, 0x00, 0x00, } diff --git a/simapp/x/ibcmiddleware/types/tx.pb.go b/simapp/x/ibcmiddleware/types/tx.pb.go index fbb8fbfe..8ea5c327 100644 --- a/simapp/x/ibcmiddleware/types/tx.pb.go +++ b/simapp/x/ibcmiddleware/types/tx.pb.go @@ -24,14 +24,15 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("ibcmiddleware/v1/tx.proto", fileDescriptor_9bdcdb1b00d59650) } var fileDescriptor_9bdcdb1b00d59650 = []byte{ - // 144 bytes of a gzipped FileDescriptorProto + // 150 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x4c, 0x4a, 0xce, 0xcd, 0x4c, 0x49, 0xc9, 0x49, 0x2d, 0x4f, 0x2c, 0x4a, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x40, 0x91, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, - 0x4f, 0xcf, 0x07, 0x4b, 0xea, 0x83, 0x58, 0x10, 0x75, 0x4e, 0x3e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, + 0x4f, 0xcf, 0x07, 0x4b, 0xea, 0x83, 0x58, 0x10, 0x75, 0x4e, 0x41, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, - 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x94, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, - 0xab, 0x5f, 0x94, 0x9f, 0x93, 0x93, 0x9c, 0x91, 0x98, 0x99, 0x57, 0xac, 0x5f, 0x9c, 0x99, 0x9b, - 0x58, 0x50, 0xa0, 0x5f, 0xa1, 0x8f, 0x6a, 0x77, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, - 0x50, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xad, 0x37, 0xea, 0x0e, 0x99, 0x00, 0x00, 0x00, + 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x91, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, + 0xab, 0x5f, 0x94, 0x9f, 0x93, 0x93, 0x9c, 0x91, 0x98, 0x99, 0x57, 0xac, 0x5f, 0x5c, 0x90, 0x58, + 0x9e, 0xa7, 0x5f, 0x9c, 0x99, 0x9b, 0x58, 0x50, 0xa0, 0x5f, 0xa1, 0x8f, 0xea, 0x82, 0x92, 0xca, + 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xd1, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x85, + 0xf0, 0xbd, 0x9f, 0x00, 0x00, 0x00, } diff --git a/simapp/x/ibcmodule/README.md b/simapp/x/ibcmodule/README.md new file mode 100644 index 00000000..ebb88e99 --- /dev/null +++ b/simapp/x/ibcmodule/README.md @@ -0,0 +1,3 @@ +# ibc-module-template + +Template for an IBC module compliant with [ICS-26 Spec](https://github.com/cosmos/ibc/blob/main/spec/core/ics-026-routing-module/README.md) diff --git a/simapp/x/ibcmodule/client/tx.go b/simapp/x/ibcmodule/client/tx.go new file mode 100644 index 00000000..ad741fa1 --- /dev/null +++ b/simapp/x/ibcmodule/client/tx.go @@ -0,0 +1,79 @@ +package cli + +import ( + "time" + + "github.com/rollchains/spawn/simapp/x/ibcmodule/types" + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" +) + +// NewTxCmd creates and returns the tx command +func NewTxCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "ibcmodule", + Short: "ibcmodule subcommands", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + cmd.AddCommand( + NewSomeDataTxCmd(), + ) + + return cmd +} + +const ( + flagPacketTimeoutTimestamp = "packet-timeout-timestamp" +) + +var defaultTimeout = uint64((time.Duration(10) * time.Minute).Nanoseconds()) + +// NewSomeDataTxCmd +func NewSomeDataTxCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "example-tx [src-port] [src-channel] [data]", + Short: "Send a packet with some data", + Args: cobra.ExactArgs(3), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + sender := clientCtx.GetFromAddress().String() + srcPort := args[0] + srcChannel := args[1] + someData := args[2] + + timeoutTimestamp, err := cmd.Flags().GetUint64(flagPacketTimeoutTimestamp) + if err != nil { + return err + } + + if timeoutTimestamp != 0 { + now := time.Now().UnixNano() + timeoutTimestamp = uint64(now + time.Duration(1*time.Hour).Nanoseconds()) + } + + msg := &types.MsgSendExampleTx{ + Sender: sender, + SourcePort: srcPort, + SourceChannel: srcChannel, + TimeoutTimestamp: timeoutTimestamp, + SomeData: someData, + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + cmd.Flags().Uint64(flagPacketTimeoutTimestamp, defaultTimeout, "Packet timeout timestamp in nanoseconds from now. Default is 10 minutes.") + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/simapp/x/ibcmodule/ibc_module.go b/simapp/x/ibcmodule/ibc_module.go new file mode 100644 index 00000000..76805551 --- /dev/null +++ b/simapp/x/ibcmodule/ibc_module.go @@ -0,0 +1,239 @@ +package ibcmodule + +import ( + "context" + "fmt" + "strings" + + "github.com/rollchains/spawn/simapp/x/ibcmodule/keeper" + + sdk "github.com/cosmos/cosmos-sdk/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + host "github.com/cosmos/ibc-go/v8/modules/core/24-host" + + channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + "github.com/rollchains/spawn/simapp/x/ibcmodule/types" +) + +var _ porttypes.IBCModule = (*ExampleIBCModule)(nil) + +// ExampleIBCModule implements all the callbacks +// that modules must define as specified in ICS-26 +type ExampleIBCModule struct { + keeper keeper.Keeper +} + +// NewExampleIBCModule creates a new IBCModule given the keeper and underlying application. +func NewExampleIBCModule(k keeper.Keeper) ExampleIBCModule { + return ExampleIBCModule{ + keeper: k, + } +} + +func (im ExampleIBCModule) OnChanOpenInit( + ctx sdk.Context, + order channeltypes.Order, + connectionHops []string, + portID string, + channelID string, + chanCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + version string, +) (string, error) { + if strings.TrimSpace(version) == "" { + version = types.Version + } + + // if order != channeltypes.UNORDERED { + // return "", fmt.Errorf("invalid channel order; expected UNORDERED") + // } + + if counterparty.PortId != types.ModuleName { + return "", fmt.Errorf("invalid counterparty port ID; expected %s, got %s", types.ModuleName, counterparty.PortId) + } + + // OpenInit must claim the channelCapability that IBC passes into the callback + if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { + return "", fmt.Errorf("failed to claim capability: %w", err) + } + + return version, nil +} + +func (im ExampleIBCModule) OnChanOpenTry( + ctx sdk.Context, + order channeltypes.Order, + connectionHops []string, + portID, channelID string, + chanCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + counterpartyVersion string, +) (version string, err error) { + // OpenTry must claim the channelCapability that IBC passes into the callback + if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { + return "", err + } + + if counterpartyVersion != types.Version { + fmt.Println("invalid counterparty version, proposing current app version", "counterpartyVersion", counterpartyVersion, "version", types.Version) + return types.Version, nil // TODO: err here? + } + + return types.Version, nil +} + +func (im ExampleIBCModule) OnChanOpenAck( + ctx sdk.Context, + portID, channelID string, + counterpartyChannelID string, + counterpartyVersion string, +) error { + if counterpartyVersion != types.Version { + return fmt.Errorf("invalid counterparty version: expected %s, got %s", types.Version, counterpartyVersion) + } + return nil +} + +// OnChanOpenConfirm implements the IBCModule interface. +func (im ExampleIBCModule) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error { + return nil +} + +// OnChanCloseInit implements the IBCModule interface. +func (im ExampleIBCModule) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error { + return fmt.Errorf("channel close is disabled for this module") +} + +// OnChanCloseConfirm implements the IBCModule interface. +func (im ExampleIBCModule) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error { + return nil +} + +// OnRecvPacket implements the IBCModule interface. +func (im ExampleIBCModule) OnRecvPacket( + ctx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, +) ibcexported.Acknowledgement { + logger := im.keeper.Logger(ctx) + ack := channeltypes.NewResultAcknowledgement([]byte{byte(1)}) + + var data types.ExamplePacketData + var ackErr error + if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { + ackErr = fmt.Errorf("cannot unmarshal example packet data: %v", err) + logger.Error(fmt.Sprintf("%s sequence %d", ackErr.Error(), packet.Sequence)) + ack = channeltypes.NewErrorAcknowledgement(ackErr) + } + + // only attempt the application logic if the packet data was successfully decoded + if ack.Success() { + // TODO: perform your logic here + err := im.handleOnRecvLogic(ctx, data) + if err != nil { + ack = channeltypes.NewErrorAcknowledgement(err) + ackErr = err + logger.Error(fmt.Sprintf("%s sequence %d", ackErr.Error(), packet.Sequence)) + } else { + logger.Info("successfully handled example packet", "sequence", packet.Sequence) + } + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypePacket, + sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + sdk.NewAttribute(sdk.AttributeKeySender, data.Sender), + sdk.NewAttribute("some_data", data.SomeData), + sdk.NewAttribute("ack_success", fmt.Sprintf("%t", ack.Success())), + ), + ) + + return ack +} + +func (im ExampleIBCModule) handleOnRecvLogic(ctx context.Context, data types.ExamplePacketData) error { + v, err := im.keeper.ExampleStore.Get(ctx) + if err != nil { + return err + } + + err = im.keeper.ExampleStore.Set(ctx, v+1) + if err != nil { + return err + } + + return nil +} + +// OnAcknowledgementPacket implements the IBCModule interface. +func (im ExampleIBCModule) OnAcknowledgementPacket( + ctx sdk.Context, + packet channeltypes.Packet, + acknowledgement []byte, + relayer sdk.AccAddress, +) error { + var ack channeltypes.Acknowledgement + if err := types.ModuleCdc.UnmarshalJSON(acknowledgement, &ack); err != nil { + return fmt.Errorf("cannot unmarshal example packet acknowledgement: %v", err) + } + + var data types.ExamplePacketData + if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { + return fmt.Errorf("cannot unmarshal example packet data: %v", err) + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypePacket, + sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + sdk.NewAttribute(sdk.AttributeKeySender, data.Sender), + sdk.NewAttribute("some_data", data.SomeData), + ), + ) + + switch resp := ack.Response.(type) { + case *channeltypes.Acknowledgement_Result: + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypePacket, + sdk.NewAttribute("success", string(resp.Result)), + ), + ) + case *channeltypes.Acknowledgement_Error: + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypePacket, + sdk.NewAttribute("error", resp.Error), + ), + ) + } + + return nil +} + +// OnTimeoutPacket implements the IBCMiddleware interface. +func (im ExampleIBCModule) OnTimeoutPacket( + ctx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, +) error { + var data types.ExamplePacketData + if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { + return fmt.Errorf("cannot unmarshal example packet data: %v", err) + } + + // Handle timeout logic here as necessary (i.e. refunds for example) or nothing at all. + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + "timeout", + sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + sdk.NewAttribute("sender", data.Sender), + ), + ) + + return nil +} diff --git a/simapp/x/ibcmodule/keeper/genesis.go b/simapp/x/ibcmodule/keeper/genesis.go new file mode 100644 index 00000000..bb3f3a90 --- /dev/null +++ b/simapp/x/ibcmodule/keeper/genesis.go @@ -0,0 +1,32 @@ +package keeper + +import ( + "fmt" + + "github.com/rollchains/spawn/simapp/x/ibcmodule/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// InitGenesis initializes the modules state from a specified GenesisState. +func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState) { + k.SetPort(ctx, types.PortID) + + // Only try to bind to port if it is not already bound, since we may already own + // port capability from capability InitGenesis + if !k.IsBound(ctx, types.PortID) { + // module binds to the port on InitChain + // and claims the returned capability + if err := k.BindPort(ctx, types.PortID); err != nil { + panic(fmt.Sprintf("could not claim port capability: %v", err)) + } + } +} + +// ExportGenesis exports the modules state. +func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { + port := k.GetPort(ctx) + return &types.GenesisState{ + PortId: port, + } +} diff --git a/simapp/x/ibcmodule/keeper/ibc_helpers.go b/simapp/x/ibcmodule/keeper/ibc_helpers.go new file mode 100644 index 00000000..cabe76ac --- /dev/null +++ b/simapp/x/ibcmodule/keeper/ibc_helpers.go @@ -0,0 +1,50 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + host "github.com/cosmos/ibc-go/v8/modules/core/24-host" +) + +func (k Keeper) IsBound(ctx sdk.Context, portID string) bool { + return k.PortKeeper.IsBound(ctx, portID) +} + +// BindPort defines a wrapper function for the port Keeper's function in +// order to expose it to module's InitGenesis function +func (k Keeper) BindPort(ctx sdk.Context, portID string) error { + cap := k.PortKeeper.BindPort(ctx, portID) + return k.ClaimCapability(ctx, cap, host.PortPath(portID)) + +} + +// GetPort returns the portID for the IBC app module. Used in ExportGenesis +func (k Keeper) GetPort(ctx sdk.Context) string { + store := k.storeService.OpenKVStore(ctx) + res, err := store.Get([]byte(types.PortKey)) + if err != nil { + panic(err) + } + return string(res) +} + +// SetPort sets the portID for the IBC app module. Used in InitGenesis +func (k Keeper) SetPort(ctx sdk.Context, portID string) { + store := k.storeService.OpenKVStore(ctx) + err := store.Set([]byte(types.PortKey), []byte(portID)) + if err != nil { + panic(err) + } +} + +// AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function +func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool { + return k.ScopedKeeper.AuthenticateCapability(ctx, cap, name) +} + +// ClaimCapability allows the IBC app module to claim a capability that core IBC +// passes to it +func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error { + return k.ScopedKeeper.ClaimCapability(ctx, cap, name) +} diff --git a/simapp/x/ibcmodule/keeper/keeper.go b/simapp/x/ibcmodule/keeper/keeper.go new file mode 100644 index 00000000..01a8802d --- /dev/null +++ b/simapp/x/ibcmodule/keeper/keeper.go @@ -0,0 +1,79 @@ +package keeper + +import ( + "github.com/rollchains/spawn/simapp/x/ibcmodule/types" + + "cosmossdk.io/collections" + "cosmossdk.io/core/store" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + + "cosmossdk.io/log" + + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + portkeeper "github.com/cosmos/ibc-go/v8/modules/core/05-port/keeper" + porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" +) + +// Keeper defines the module keeper. +type Keeper struct { + storeService store.KVStoreService + cdc codec.BinaryCodec + schema collections.Schema + + ics4Wrapper porttypes.ICS4Wrapper + PortKeeper *portkeeper.Keeper + ScopedKeeper capabilitykeeper.ScopedKeeper + + ExampleStore collections.Item[uint64] + + authority string +} + +// NewKeeper creates a new Keeper instance. +func NewKeeper( + appCodec codec.BinaryCodec, + storeService store.KVStoreService, + + ics4Wrapper porttypes.ICS4Wrapper, // usually the IBC ChannelKeeper + portKeeper *portkeeper.Keeper, + scopedKeeper capabilitykeeper.ScopedKeeper, + + authority string, +) Keeper { + sb := collections.NewSchemaBuilder(storeService) + + k := Keeper{ + cdc: appCodec, + ics4Wrapper: ics4Wrapper, + storeService: storeService, + + PortKeeper: portKeeper, + ScopedKeeper: scopedKeeper, + + ExampleStore: collections.NewItem(sb, collections.NewPrefix(1), "example", collections.Uint64Value), + authority: authority, + } + + schema, err := sb.Build() + if err != nil { + panic(err) + } + + k.schema = schema + + return k +} + +// WithICS4Wrapper sets the ICS4Wrapper. This function may be used after +// the keeper's creation to set the module which is above this module +// in the IBC application stack. +func (k *Keeper) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper) { + k.ics4Wrapper = wrapper +} + +// Logger returns a module-specific logger. +func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", "x/"+ibcexported.ModuleName+"-"+types.ModuleName) +} diff --git a/simapp/x/ibcmodule/keeper/msg_server.go b/simapp/x/ibcmodule/keeper/msg_server.go new file mode 100644 index 00000000..f4adb519 --- /dev/null +++ b/simapp/x/ibcmodule/keeper/msg_server.go @@ -0,0 +1,55 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v8/modules/core/24-host" + "github.com/rollchains/spawn/simapp/x/ibcmodule/types" +) + +var _ types.MsgServer = msgServer{} + +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the module MsgServer interface. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{Keeper: keeper} +} + +// SendTx implements types.MsgServer. +func (ms msgServer) SendExampleTx(ctx context.Context, msg *types.MsgSendExampleTx) (*types.MsgSendExampleTxResponse, error) { + sequence, err := ms.sendPacket( + ctx, msg.SourcePort, msg.SourceChannel, msg.Sender, msg.SomeData, msg.TimeoutTimestamp) + if err != nil { + return nil, err + } + + return &types.MsgSendExampleTxResponse{ + Sequence: sequence, + }, nil +} + +func (ms msgServer) sendPacket(ctx context.Context, sourcePort, sourceChannel, sender, someData string, timeoutTimestamp uint64) (sequence uint64, err error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + channelCap, ok := ms.ScopedKeeper.GetCapability(sdkCtx, host.ChannelCapabilityPath(sourcePort, sourceChannel)) + if !ok { + return 0, fmt.Errorf("module does not own channel capability") + } + + packetData := types.ExamplePacketData{ + Sender: sender, + SomeData: someData, + } + + sequence, err = ms.ics4Wrapper.SendPacket(sdkCtx, channelCap, sourcePort, sourceChannel, clienttypes.ZeroHeight(), timeoutTimestamp, packetData.MustGetBytes()) + if err != nil { + return 0, err + } + return sequence, nil +} diff --git a/simapp/x/ibcmodule/module.go b/simapp/x/ibcmodule/module.go new file mode 100644 index 00000000..0fe1294f --- /dev/null +++ b/simapp/x/ibcmodule/module.go @@ -0,0 +1,141 @@ +package ibcmodule + +import ( + "encoding/json" + + "github.com/grpc-ecosystem/grpc-gateway/runtime" + cli "github.com/rollchains/spawn/simapp/x/ibcmodule/client" + "github.com/rollchains/spawn/simapp/x/ibcmodule/keeper" + "github.com/rollchains/spawn/simapp/x/ibcmodule/types" + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + + abci "github.com/cometbft/cometbft/abci/types" +) + +var ( + _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModule = AppModule{} + _ module.AppModuleSimulation = AppModule{} +) + +// AppModuleBasic is the module AppModuleBasic. +type AppModuleBasic struct{} + +// Name implements AppModuleBasic interface. +func (AppModuleBasic) Name() string { + return types.ModuleName +} + +// RegisterLegacyAminoCodec implements AppModuleBasic interface. +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +// RegisterInterfaces registers module concrete types into protobuf Any. +func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) +} + +// DefaultGenesis returns default genesis state as raw bytes for the swap module. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return nil +} + +// ValidateGenesis performs genesis state validation for the swap module. +func (AppModuleBasic) ValidateGenesis( + cdc codec.JSONCodec, + config client.TxEncodingConfig, + bz json.RawMessage, +) error { + return nil +} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the swap module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {} + +// GetTxCmd implements AppModuleBasic interface. +func (AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.NewTxCmd() +} + +// GetQueryCmd implements AppModuleBasic interface. +func (AppModuleBasic) GetQueryCmd() *cobra.Command { + return nil +} + +// AppModule is the module AppModule. +type AppModule struct { + AppModuleBasic + keeper keeper.Keeper +} + +// IsAppModule implements module.AppModule. +func (AppModule) IsAppModule() { +} + +// IsOnePerModuleType implements module.AppModule. +func (AppModule) IsOnePerModuleType() { +} + +// NewAppModule initializes a new AppModule for the module. +func NewAppModule(keeper keeper.Keeper) *AppModule { + return &AppModule{ + keeper: keeper, + } +} + +// RegisterInvariants implements the AppModule interface. +func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} + +// RegisterServices registers module services. +func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) +} + +// InitGenesis performs genesis initialization for the ibc-router module. It returns +// no validator updates. +func (am AppModule) InitGenesis( + ctx sdk.Context, + cdc codec.JSONCodec, + data json.RawMessage, +) []abci.ValidatorUpdate { + var genesisState types.GenesisState + cdc.MustUnmarshalJSON(data, &genesisState) + am.keeper.InitGenesis(ctx, genesisState) + + am.keeper.ExampleStore.Set(ctx, 0) + + return []abci.ValidatorUpdate{} +} + +// ExportGenesis returns the exported genesis state as raw bytes for the swap module. +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + genState := am.keeper.ExportGenesis(ctx) + return cdc.MustMarshalJSON(genState) +} + +// ConsensusVersion returns the consensus state breaking version for the swap module. +func (am AppModule) ConsensusVersion() uint64 { return 1 } + +// GenerateGenesisState implements the AppModuleSimulation interface. +func (am AppModule) GenerateGenesisState(simState *module.SimulationState) {} + +// ProposalContents implements the AppModuleSimulation interface. +func (am AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { + return nil +} + +// RegisterStoreDecoder implements the AppModuleSimulation interface. +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {} + +// WeightedOperations implements the AppModuleSimulation interface. +func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { + return nil +} diff --git a/simapp/x/ibcmodule/types/codec.go b/simapp/x/ibcmodule/types/codec.go new file mode 100644 index 00000000..ee6ca347 --- /dev/null +++ b/simapp/x/ibcmodule/types/codec.go @@ -0,0 +1,37 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + // this line is used by starport scaffolding # 1 +) + +var ( + amino = codec.NewLegacyAmino() + AminoCdc = codec.NewAminoCodec(amino) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + sdk.RegisterLegacyAminoCodec(amino) +} + +// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgSendExampleTx{}, ModuleName+"/MsgSendExampleTx", nil) +} + +func RegisterInterfaces(registry types.InterfaceRegistry) { + // this line is used by starport scaffolding # 3 + + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgSendExampleTx{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/simapp/x/ibcmodule/types/errors.go b/simapp/x/ibcmodule/types/errors.go new file mode 100644 index 00000000..f46defe8 --- /dev/null +++ b/simapp/x/ibcmodule/types/errors.go @@ -0,0 +1,7 @@ +package types + +import sdkerrors "cosmossdk.io/errors" + +var ( + ErrInvalidGenesisState = sdkerrors.Register(ModuleName, 1, "invalid genesis state") +) diff --git a/simapp/x/ibcmodule/types/expected_keepers.go b/simapp/x/ibcmodule/types/expected_keepers.go new file mode 100644 index 00000000..fd3b3800 --- /dev/null +++ b/simapp/x/ibcmodule/types/expected_keepers.go @@ -0,0 +1,3 @@ +package types + +// Define the expected interfaces that the module needs in order to properly function here. diff --git a/simapp/x/ibcmodule/types/genesis.go b/simapp/x/ibcmodule/types/genesis.go new file mode 100644 index 00000000..23e8a118 --- /dev/null +++ b/simapp/x/ibcmodule/types/genesis.go @@ -0,0 +1,26 @@ +package types + +import host "github.com/cosmos/ibc-go/v8/modules/core/24-host" + +// DefaultGenesisState returns the default module GenesisState. +func DefaultGenesisState() *GenesisState { + return &GenesisState{ + PortId: PortID, + } +} + +// NewGenesisState initializes and returns a new GenesisState. +func NewGenesisState() *GenesisState { + return &GenesisState{ + PortId: PortID, + } +} + +// Validate performs basic validation of the GenesisState. +func (gs *GenesisState) Validate() error { + if err := host.PortIdentifierValidator(gs.PortId); err != nil { + return err + } + + return nil +} diff --git a/simapp/x/ibcmodule/types/genesis.pb.go b/simapp/x/ibcmodule/types/genesis.pb.go new file mode 100644 index 00000000..f5ca4023 --- /dev/null +++ b/simapp/x/ibcmodule/types/genesis.pb.go @@ -0,0 +1,318 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibcmodule/v1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the modules genesis state. +type GenesisState struct { + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_50f044dd23da5d20, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "ibcmodule.v1.GenesisState") +} + +func init() { proto.RegisterFile("ibcmodule/v1/genesis.proto", fileDescriptor_50f044dd23da5d20) } + +var fileDescriptor_50f044dd23da5d20 = []byte{ + // 185 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x4c, 0x4a, 0xce, + 0xcd, 0x4f, 0x29, 0xcd, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x81, 0xcb, 0xe9, 0x95, 0x19, 0x4a, 0x89, 0xa4, + 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf4, 0x41, 0x2c, 0x88, 0x1a, 0x25, 0x75, 0x2e, 0x1e, 0x77, 0x88, + 0xa6, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0x21, 0x71, 0x2e, 0xf6, 0x82, 0xfc, 0xa2, 0x92, 0xf8, 0xcc, + 0x14, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x36, 0x10, 0xd7, 0x33, 0xc5, 0xc9, 0xef, 0xc4, + 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, + 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x4c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, + 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x8b, 0xf2, 0x73, 0x72, 0x92, 0x33, 0x12, 0x33, 0xf3, 0x8a, 0xf5, + 0x8b, 0x0b, 0x12, 0xcb, 0xf3, 0xf4, 0x8b, 0x33, 0x73, 0x13, 0x0b, 0x0a, 0xf4, 0x2b, 0xf4, 0x11, + 0xee, 0x2c, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xdb, 0x6f, 0x0c, 0x08, 0x00, 0x00, 0xff, + 0xff, 0xfb, 0x6e, 0x0c, 0xbc, 0xc1, 0x00, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/simapp/x/ibcmodule/types/keys.go b/simapp/x/ibcmodule/types/keys.go new file mode 100644 index 00000000..6094414a --- /dev/null +++ b/simapp/x/ibcmodule/types/keys.go @@ -0,0 +1,16 @@ +package types + +const ( + // ModuleName defines the name of module. + ModuleName = "ibcmodule" + + // PortID defines the port ID that module module binds to. + PortID = ModuleName + + // Version defines the current version the IBC module supports + Version = ModuleName + "-1" + + StoreKey = ModuleName + + EventTypePacket = "example_data_packet" +) diff --git a/simapp/x/ibcmodule/types/msgs.go b/simapp/x/ibcmodule/types/msgs.go new file mode 100644 index 00000000..bb218e9b --- /dev/null +++ b/simapp/x/ibcmodule/types/msgs.go @@ -0,0 +1,36 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" +) + +var ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) + +var _ ibcexported.PacketData = (*ExamplePacketData)(nil) + +// GetPacketSender implements exported.PacketData. +func (epd *ExamplePacketData) GetPacketSender(sourcePortID string) string { + return epd.Sender +} + +// GetBytes returns the sorted JSON encoding of the packet data. +func (epd ExamplePacketData) GetBytes() ([]byte, error) { + bz, err := codec.ProtoMarshalJSON(&epd, ModuleCdc.InterfaceRegistry()) + if err != nil { + return nil, err + } + + return sdk.MustSortJSON(bz), nil +} + +// GetBytes must return the sorted JSON encoding of the packet data. +func (epd ExamplePacketData) MustGetBytes() []byte { + bz, err := epd.GetBytes() + if err != nil { + panic(err) + } + return bz +} diff --git a/simapp/x/ibcmodule/types/query.pb.go b/simapp/x/ibcmodule/types/query.pb.go new file mode 100644 index 00000000..8a2246a3 --- /dev/null +++ b/simapp/x/ibcmodule/types/query.pb.go @@ -0,0 +1,38 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibcmodule/v1/query.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func init() { proto.RegisterFile("ibcmodule/v1/query.proto", fileDescriptor_7328e789c44a7a1e) } + +var fileDescriptor_7328e789c44a7a1e = []byte{ + // 148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc8, 0x4c, 0x4a, 0xce, + 0xcd, 0x4f, 0x29, 0xcd, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x81, 0xcb, 0xe8, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, + 0xe7, 0x83, 0x25, 0xf4, 0x41, 0x2c, 0x88, 0x1a, 0x27, 0xbf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, + 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, + 0x3c, 0x96, 0x63, 0x88, 0x32, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, + 0x2f, 0xca, 0xcf, 0xc9, 0x49, 0xce, 0x48, 0xcc, 0xcc, 0x2b, 0xd6, 0x2f, 0x2e, 0x48, 0x2c, 0xcf, + 0xd3, 0x2f, 0xce, 0xcc, 0x4d, 0x2c, 0x28, 0xd0, 0xaf, 0xd0, 0x47, 0x58, 0x5e, 0x52, 0x59, 0x90, + 0x5a, 0x9c, 0xc4, 0x06, 0x36, 0xd6, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x77, 0xe2, 0x63, 0xe9, + 0x96, 0x00, 0x00, 0x00, +} diff --git a/simapp/x/ibcmodule/types/tx.pb.go b/simapp/x/ibcmodule/types/tx.pb.go new file mode 100644 index 00000000..4d4caae4 --- /dev/null +++ b/simapp/x/ibcmodule/types/tx.pb.go @@ -0,0 +1,1252 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibcmodule/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgSendExampleTx defines the payload for Msg/SendExampleTx +type MsgSendExampleTx struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SourcePort string `protobuf:"bytes,2,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"` + SourceChannel string `protobuf:"bytes,3,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty"` + TimeoutTimestamp uint64 `protobuf:"varint,4,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + SomeData string `protobuf:"bytes,5,opt,name=some_data,json=someData,proto3" json:"some_data,omitempty"` +} + +func (m *MsgSendExampleTx) Reset() { *m = MsgSendExampleTx{} } +func (m *MsgSendExampleTx) String() string { return proto.CompactTextString(m) } +func (*MsgSendExampleTx) ProtoMessage() {} +func (*MsgSendExampleTx) Descriptor() ([]byte, []int) { + return fileDescriptor_05cec4d6b8fbe27a, []int{0} +} +func (m *MsgSendExampleTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSendExampleTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSendExampleTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSendExampleTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSendExampleTx.Merge(m, src) +} +func (m *MsgSendExampleTx) XXX_Size() int { + return m.Size() +} +func (m *MsgSendExampleTx) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSendExampleTx.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSendExampleTx proto.InternalMessageInfo + +// MsgSendExampleTxResponse defines the response. +type MsgSendExampleTxResponse struct { + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (m *MsgSendExampleTxResponse) Reset() { *m = MsgSendExampleTxResponse{} } +func (m *MsgSendExampleTxResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSendExampleTxResponse) ProtoMessage() {} +func (*MsgSendExampleTxResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_05cec4d6b8fbe27a, []int{1} +} +func (m *MsgSendExampleTxResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSendExampleTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSendExampleTxResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSendExampleTxResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSendExampleTxResponse.Merge(m, src) +} +func (m *MsgSendExampleTxResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSendExampleTxResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSendExampleTxResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSendExampleTxResponse proto.InternalMessageInfo + +// ExamplePacketData +type ExamplePacketData struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + SomeData string `protobuf:"bytes,2,opt,name=some_data,json=someData,proto3" json:"some_data,omitempty"` +} + +func (m *ExamplePacketData) Reset() { *m = ExamplePacketData{} } +func (m *ExamplePacketData) String() string { return proto.CompactTextString(m) } +func (*ExamplePacketData) ProtoMessage() {} +func (*ExamplePacketData) Descriptor() ([]byte, []int) { + return fileDescriptor_05cec4d6b8fbe27a, []int{2} +} +func (m *ExamplePacketData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExamplePacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExamplePacketData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExamplePacketData) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExamplePacketData.Merge(m, src) +} +func (m *ExamplePacketData) XXX_Size() int { + return m.Size() +} +func (m *ExamplePacketData) XXX_DiscardUnknown() { + xxx_messageInfo_ExamplePacketData.DiscardUnknown(m) +} + +var xxx_messageInfo_ExamplePacketData proto.InternalMessageInfo + +func (m *ExamplePacketData) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *ExamplePacketData) GetSomeData() string { + if m != nil { + return m.SomeData + } + return "" +} + +// Acknowledgement +type Acknowledgement struct { + // response + // + // Types that are valid to be assigned to Response: + // + // *Acknowledgement_Result + // *Acknowledgement_Error + Response isAcknowledgement_Response `protobuf_oneof:"response"` +} + +func (m *Acknowledgement) Reset() { *m = Acknowledgement{} } +func (m *Acknowledgement) String() string { return proto.CompactTextString(m) } +func (*Acknowledgement) ProtoMessage() {} +func (*Acknowledgement) Descriptor() ([]byte, []int) { + return fileDescriptor_05cec4d6b8fbe27a, []int{3} +} +func (m *Acknowledgement) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Acknowledgement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Acknowledgement.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Acknowledgement) XXX_Merge(src proto.Message) { + xxx_messageInfo_Acknowledgement.Merge(m, src) +} +func (m *Acknowledgement) XXX_Size() int { + return m.Size() +} +func (m *Acknowledgement) XXX_DiscardUnknown() { + xxx_messageInfo_Acknowledgement.DiscardUnknown(m) +} + +var xxx_messageInfo_Acknowledgement proto.InternalMessageInfo + +type isAcknowledgement_Response interface { + isAcknowledgement_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type Acknowledgement_Result struct { + Result []byte `protobuf:"bytes,21,opt,name=result,proto3,oneof" json:"result,omitempty"` +} +type Acknowledgement_Error struct { + Error string `protobuf:"bytes,22,opt,name=error,proto3,oneof" json:"error,omitempty"` +} + +func (*Acknowledgement_Result) isAcknowledgement_Response() {} +func (*Acknowledgement_Error) isAcknowledgement_Response() {} + +func (m *Acknowledgement) GetResponse() isAcknowledgement_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *Acknowledgement) GetResult() []byte { + if x, ok := m.GetResponse().(*Acknowledgement_Result); ok { + return x.Result + } + return nil +} + +func (m *Acknowledgement) GetError() string { + if x, ok := m.GetResponse().(*Acknowledgement_Error); ok { + return x.Error + } + return "" +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Acknowledgement) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Acknowledgement_Result)(nil), + (*Acknowledgement_Error)(nil), + } +} + +func init() { + proto.RegisterType((*MsgSendExampleTx)(nil), "ibcmodule.v1.MsgSendExampleTx") + proto.RegisterType((*MsgSendExampleTxResponse)(nil), "ibcmodule.v1.MsgSendExampleTxResponse") + proto.RegisterType((*ExamplePacketData)(nil), "ibcmodule.v1.ExamplePacketData") + proto.RegisterType((*Acknowledgement)(nil), "ibcmodule.v1.Acknowledgement") +} + +func init() { proto.RegisterFile("ibcmodule/v1/tx.proto", fileDescriptor_05cec4d6b8fbe27a) } + +var fileDescriptor_05cec4d6b8fbe27a = []byte{ + // 462 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xb5, 0xdb, 0x24, 0x4a, 0xef, 0xd7, 0x7e, 0x6d, 0x47, 0x34, 0x58, 0x46, 0x72, 0xa3, 0x48, + 0xa0, 0xa8, 0x48, 0xb6, 0x0a, 0xac, 0x2a, 0x36, 0x14, 0x90, 0xb2, 0x29, 0x54, 0xa6, 0x12, 0x12, + 0x9b, 0x68, 0x62, 0x5f, 0x39, 0x56, 0x3d, 0x33, 0x66, 0xee, 0xb8, 0x0d, 0x3b, 0xc4, 0x8a, 0x25, + 0x8f, 0xc0, 0x23, 0xf4, 0x31, 0xd8, 0x20, 0x75, 0xc9, 0x12, 0x25, 0x8b, 0xbe, 0x06, 0xf2, 0x4f, + 0x0b, 0xa9, 0x04, 0x2b, 0xfb, 0x9c, 0x73, 0xef, 0x9d, 0x73, 0x7f, 0x60, 0x27, 0x9d, 0x44, 0x42, + 0xc5, 0x45, 0x86, 0xc1, 0xd9, 0x7e, 0x60, 0x66, 0x7e, 0xae, 0x95, 0x51, 0x6c, 0xfd, 0x86, 0xf6, + 0xcf, 0xf6, 0xdd, 0x3b, 0x89, 0x4a, 0x54, 0x25, 0x04, 0xe5, 0x5f, 0x1d, 0xe3, 0xde, 0x8d, 0x14, + 0x09, 0x45, 0x81, 0xa0, 0xa4, 0xcc, 0x15, 0x94, 0xd4, 0xc2, 0xe0, 0xbb, 0x0d, 0x5b, 0x47, 0x94, + 0xbc, 0x41, 0x19, 0xbf, 0x9c, 0x71, 0x91, 0x67, 0x78, 0x32, 0x63, 0x3d, 0xe8, 0x10, 0xca, 0x18, + 0xb5, 0x63, 0xf7, 0xed, 0xe1, 0x5a, 0xd8, 0x20, 0xb6, 0x0b, 0xff, 0x91, 0x2a, 0x74, 0x84, 0xe3, + 0x5c, 0x69, 0xe3, 0xac, 0x54, 0x22, 0xd4, 0xd4, 0xb1, 0xd2, 0x86, 0xdd, 0x87, 0xff, 0x9b, 0x80, + 0x68, 0xca, 0xa5, 0xc4, 0xcc, 0x59, 0xad, 0x62, 0x36, 0x6a, 0xf6, 0x79, 0x4d, 0xb2, 0x87, 0xb0, + 0x6d, 0x52, 0x81, 0xaa, 0x30, 0xe3, 0xf2, 0x4b, 0x86, 0x8b, 0xdc, 0x69, 0xf5, 0xed, 0x61, 0x2b, + 0xdc, 0x6a, 0x84, 0x93, 0x6b, 0x9e, 0xdd, 0x83, 0x35, 0x52, 0x02, 0xc7, 0x31, 0x37, 0xdc, 0x69, + 0x57, 0xe5, 0xba, 0x25, 0xf1, 0x82, 0x1b, 0x7e, 0xb0, 0xf9, 0xf9, 0xeb, 0xae, 0xf5, 0xe9, 0xea, + 0x62, 0xaf, 0xb1, 0x38, 0x78, 0x0a, 0xce, 0xed, 0x76, 0x42, 0xa4, 0x5c, 0x49, 0x42, 0xe6, 0x42, + 0x97, 0xf0, 0x7d, 0x81, 0x32, 0xc2, 0xaa, 0xb1, 0x56, 0x78, 0x83, 0x0f, 0x5a, 0x65, 0xa1, 0xc1, + 0x08, 0xb6, 0x9b, 0xb4, 0x63, 0x1e, 0x9d, 0xa2, 0x29, 0xdf, 0xf8, 0xeb, 0x34, 0x96, 0x8c, 0xad, + 0x2c, 0x1b, 0x1b, 0xbc, 0x86, 0xcd, 0x67, 0xd1, 0xa9, 0x54, 0xe7, 0x19, 0xc6, 0x09, 0x0a, 0x94, + 0x86, 0x39, 0xd0, 0xd1, 0x48, 0x45, 0x66, 0x9c, 0x9d, 0xbe, 0x3d, 0x5c, 0x1f, 0x59, 0x61, 0x83, + 0x59, 0x0f, 0xda, 0xa8, 0xb5, 0xd2, 0x4e, 0xaf, 0xac, 0x32, 0xb2, 0xc2, 0x1a, 0x1e, 0x02, 0x74, + 0x75, 0x63, 0xfe, 0x11, 0xc2, 0xea, 0x11, 0x25, 0xec, 0x2d, 0x6c, 0x2c, 0xef, 0xca, 0xf3, 0xff, + 0x5c, 0xbf, 0x7f, 0xbb, 0x79, 0xf7, 0xc1, 0xbf, 0xf5, 0xeb, 0xe1, 0xb8, 0xed, 0x8f, 0x57, 0x17, + 0x7b, 0xf6, 0xe1, 0xab, 0x6f, 0x73, 0xcf, 0xbe, 0x9c, 0x7b, 0xf6, 0xcf, 0xb9, 0x67, 0x7f, 0x59, + 0x78, 0xd6, 0xe5, 0xc2, 0xb3, 0x7e, 0x2c, 0x3c, 0xeb, 0xdd, 0x93, 0x24, 0x35, 0xd3, 0x62, 0xe2, + 0x47, 0x4a, 0x04, 0x5a, 0x65, 0x59, 0x34, 0xe5, 0xa9, 0xa4, 0x80, 0x72, 0x7e, 0x2e, 0x03, 0x4a, + 0x05, 0xcf, 0xf3, 0x60, 0x16, 0xfc, 0x3e, 0x51, 0xf3, 0x21, 0x47, 0x9a, 0x74, 0xaa, 0x33, 0x7b, + 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x49, 0xfb, 0xe9, 0xa7, 0xbc, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // SendExampleTx defines a rpc handler for MsgSendExampleTx. + SendExampleTx(ctx context.Context, in *MsgSendExampleTx, opts ...grpc.CallOption) (*MsgSendExampleTxResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SendExampleTx(ctx context.Context, in *MsgSendExampleTx, opts ...grpc.CallOption) (*MsgSendExampleTxResponse, error) { + out := new(MsgSendExampleTxResponse) + err := c.cc.Invoke(ctx, "/ibcmodule.v1.Msg/SendExampleTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // SendExampleTx defines a rpc handler for MsgSendExampleTx. + SendExampleTx(context.Context, *MsgSendExampleTx) (*MsgSendExampleTxResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) SendExampleTx(ctx context.Context, req *MsgSendExampleTx) (*MsgSendExampleTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendExampleTx not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_SendExampleTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSendExampleTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SendExampleTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibcmodule.v1.Msg/SendExampleTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SendExampleTx(ctx, req.(*MsgSendExampleTx)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "ibcmodule.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SendExampleTx", + Handler: _Msg_SendExampleTx_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ibcmodule/v1/tx.proto", +} + +func (m *MsgSendExampleTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSendExampleTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSendExampleTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SomeData) > 0 { + i -= len(m.SomeData) + copy(dAtA[i:], m.SomeData) + i = encodeVarintTx(dAtA, i, uint64(len(m.SomeData))) + i-- + dAtA[i] = 0x2a + } + if m.TimeoutTimestamp != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TimeoutTimestamp)) + i-- + dAtA[i] = 0x20 + } + if len(m.SourceChannel) > 0 { + i -= len(m.SourceChannel) + copy(dAtA[i:], m.SourceChannel) + i = encodeVarintTx(dAtA, i, uint64(len(m.SourceChannel))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourcePort) > 0 { + i -= len(m.SourcePort) + copy(dAtA[i:], m.SourcePort) + i = encodeVarintTx(dAtA, i, uint64(len(m.SourcePort))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSendExampleTxResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSendExampleTxResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSendExampleTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sequence != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ExamplePacketData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExamplePacketData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExamplePacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SomeData) > 0 { + i -= len(m.SomeData) + copy(dAtA[i:], m.SomeData) + i = encodeVarintTx(dAtA, i, uint64(len(m.SomeData))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Acknowledgement) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Acknowledgement) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Acknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Response != nil { + { + size := m.Response.Size() + i -= size + if _, err := m.Response.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *Acknowledgement_Result) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Acknowledgement_Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Result != nil { + i -= len(m.Result) + copy(dAtA[i:], m.Result) + i = encodeVarintTx(dAtA, i, uint64(len(m.Result))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + return len(dAtA) - i, nil +} +func (m *Acknowledgement_Error) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Acknowledgement_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintTx(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + return len(dAtA) - i, nil +} +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgSendExampleTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SourcePort) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SourceChannel) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.TimeoutTimestamp != 0 { + n += 1 + sovTx(uint64(m.TimeoutTimestamp)) + } + l = len(m.SomeData) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSendExampleTxResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sequence != 0 { + n += 1 + sovTx(uint64(m.Sequence)) + } + return n +} + +func (m *ExamplePacketData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.SomeData) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *Acknowledgement) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *Acknowledgement_Result) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Result != nil { + l = len(m.Result) + n += 2 + l + sovTx(uint64(l)) + } + return n +} +func (m *Acknowledgement_Error) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Error) + n += 2 + l + sovTx(uint64(l)) + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgSendExampleTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSendExampleTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSendExampleTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourcePort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourcePort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceChannel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) + } + m.TimeoutTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeoutTimestamp |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SomeData", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SomeData = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSendExampleTxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSendExampleTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSendExampleTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExamplePacketData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExamplePacketData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExamplePacketData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SomeData", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SomeData = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Acknowledgement) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Acknowledgement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Acknowledgement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Response = &Acknowledgement_Result{v} + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Response = &Acknowledgement_Error{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/spawn/cfg.go b/spawn/cfg.go index 0057bbdc..a2bd9a1b 100644 --- a/spawn/cfg.go +++ b/spawn/cfg.go @@ -328,6 +328,7 @@ func (cfg *NewChainConfig) SetupLocalInterchainJSON() { }, } + // Create a chain that is thisnetwork -> cosmoshub if cfg.IsFeatureEnabled(InterchainSecurity) { c.SetICSConsumerLink("localcosmos-1") } else { @@ -339,6 +340,25 @@ func (cfg *NewChainConfig) SetupLocalInterchainJSON() { if err := cc.SaveJSON(fmt.Sprintf("%s/chains/testnet.json", cfg.ProjectName)); err != nil { panic(err) } + + // Create a testnet that is thisnetwork -> thisnetwork (great for IBC module testing) + // To complex for now to support (ICS1+Chain & ICS2+Chain2) + if !cfg.IsFeatureEnabled(InterchainSecurity) { + chainB := localictypes.NewChainBuilder(cfg.ProjectName, "localchain-2", cfg.BinDaemon, cfg.Denom, cfg.Bech32Prefix). + SetBlockTime("2000ms"). + SetDockerImage(ibc.NewDockerImage(strings.ToLower(cfg.ProjectName), "local", "")). + SetTrustingPeriod("336h"). + SetDefaultSDKv47Genesis(2) + + c.SetIBCPaths([]string{}) // clear IBC paths + c.SetAppendedIBCPathLink(chainB) + + cc = localictypes.NewChainsConfig(c, chainB) + if err := cc.SaveJSON(fmt.Sprintf("%s/chains/self-ibc.json", cfg.ProjectName)); err != nil { + panic(err) + } + } + } // NormalizeDisabledNames normalizes the names, removes any parent dependencies, and removes duplicates.