diff --git a/changelog.md b/changelog.md index 99e6320503..907f6717a7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,10 +1,16 @@ # Changelog +## [`v0.22.1`](https://github.com/ignite-hq/cli/releases/tag/v0.22.1) + +### Fixes + +- Fix IBC module scaffolding interface in templates + ## [`v0.22.0`](https://github.com/ignite-hq/cli/releases/tag/v0.22.0) ### Features -- Optimized the build system. The `c serve`, `chain build`, `chain generate` commands and other variants are way faster now +- Optimized the build system. The `chain serve`, `chain build`, `chain generate` commands and other variants are way faster now - Upgraded CLI and templates to use IBC v3 ### Fixes diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000000..b2d6de3062 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,20 @@ +# Dependencies +/node_modules + +# Production +/build + +# Generated files +.docusaurus +.cache-loader + +# Misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js deleted file mode 100644 index ed9621da08..0000000000 --- a/docs/.vuepress/config.js +++ /dev/null @@ -1,134 +0,0 @@ -module.exports = { - theme: "cosmos", - title: "Ignite CLI", - head: [ - [ - "script", - { - async: true, - src: "https://www.googletagmanager.com/gtag/js?id=G-XL9GNV1KHW", - }, - ], - [ - "script", - {}, - [ - "window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-XL9GNV1KHW');", - ], - ], - ], - themeConfig: { - logo: { - src: "/logo.png", - }, - algolia: { - id: "BH4D9OD16A", - key: "d6908a9436133e03e9b0131bad808775", - index: "docs-startport", - }, - sidebar: { - auto: true, - nav: [ - { - title: "Resources", - children: [ - { - title: "Ignite CLI on Github", - path: "https://github.com/ignite-hq/cli", - }, - { - title: "Cosmos SDK Docs", - path: "https://docs.cosmos.network", - }, - ], - }, - ], - }, - topbar: { - banner: false, - }, - custom: true, - footer: { - question: { - text: - "Chat with Ignite CLI developers in Discord.", - }, - logo: "/logo.svg", - textLink: { - text: "ignite.com", - url: "https://ignite.com/", - }, - services: [ - { - service: "twitter", - url: "https://twitter.com/ignite_dev", - }, - { - service: "linkedin", - url: "https://linkedin.com/company/ignt/", - }, - { - service: "discord", - url: "https://discord.gg/ignite", - }, - { - service: "youtube", - url: "https://www.youtube.com/ignitehq", - }, - ], - - smallprint: - "This website is maintained by Ignite. The contents and opinions of this website are those of Ignite.", - links: [ - { - title: "Documentation", - children: [ - { - title: "Cosmos SDK", - url: "https://docs.cosmos.network", - }, - { - title: "Cosmos Hub", - url: "https://hub.cosmos.network", - }, - { - title: "Tendermint Core", - url: "https://docs.tendermint.com", - }, - ], - }, - { - title: "Community", - children: [ - { - title: "Cosmos blog", - url: "https://blog.cosmos.network", - }, - { - title: "Forum", - url: "https://forum.cosmos.network", - }, - { - title: "Chat", - url: "https://discord.gg/ignite", - }, - ], - }, - { - title: "Contributing", - children: [ - { - title: "Contributing to the docs", - url: - "https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md", - }, - { - title: "Source code on GitHub", - url: "https://github.com/cosmos/cosmos-sdk/", - }, - ], - }, - ], - }, - }, -}; diff --git a/docs/.vuepress/public/logo.svg b/docs/.vuepress/public/logo.svg deleted file mode 100644 index ecb7882b8f..0000000000 --- a/docs/.vuepress/public/logo.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/docs/babel.config.js b/docs/babel.config.js new file mode 100644 index 0000000000..e00595dae7 --- /dev/null +++ b/docs/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: [require.resolve('@docusaurus/core/lib/babel/preset')], +}; diff --git a/docs/bounty/index.md b/docs/docs/06-bounty.md similarity index 92% rename from docs/bounty/index.md rename to docs/docs/06-bounty.md index 92d0a43f34..c4ae33944d 100644 --- a/docs/bounty/index.md +++ b/docs/docs/06-bounty.md @@ -1,9 +1,6 @@ --- -order: 1 +sidebar_position: 6 description: Ignite CLI bounty program incentives and rewards. -parent: - order: 7 - title: Bounty program --- # Bounty program diff --git a/docs/cli/index.md b/docs/docs/07-cli.md similarity index 85% rename from docs/cli/index.md rename to docs/docs/07-cli.md index 4e6252f449..9880296298 100644 --- a/docs/cli/index.md +++ b/docs/docs/07-cli.md @@ -1,9 +1,6 @@ --- -order: 1 -description: Ignite CLI docs. -parent: - order: 8 - title: CLI Reference +sidebar_position: 7 +description: Ignite CLI docs. --- # CLI Reference @@ -244,6 +241,7 @@ ignite chain build [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -h, --help help for build --home string Home directory used for blockchains -o, --output string binary output path @@ -293,6 +291,7 @@ ignite chain init [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -h, --help help for init --home string Home directory used for blockchains -p, --path string path of the app (default ".") @@ -318,6 +317,7 @@ ignite chain serve [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -c, --config string Ignite config file (default: ./config.yml) -f, --force-reset Force reset of the app state on start and every source change -h, --help help for serve @@ -406,6 +406,7 @@ Produced source code can be regenerated by running a command again and is not me **Options** ``` + --clear-cache Clear the build cache (advanced) -h, --help help for generate -p, --path string path of the app (default ".") ``` @@ -437,6 +438,7 @@ ignite generate dart [flags] **Options inherited from parent commands** ``` + --clear-cache Clear the build cache (advanced) -p, --path string path of the app (default ".") ``` @@ -463,6 +465,7 @@ ignite generate openapi [flags] **Options inherited from parent commands** ``` + --clear-cache Clear the build cache (advanced) -p, --path string path of the app (default ".") ``` @@ -489,6 +492,7 @@ ignite generate proto-go [flags] **Options inherited from parent commands** ``` + --clear-cache Clear the build cache (advanced) -p, --path string path of the app (default ".") ``` @@ -516,6 +520,7 @@ ignite generate vuex [flags] **Options inherited from parent commands** ``` + --clear-cache Clear the build cache (advanced) -p, --path string path of the app (default ".") ``` @@ -552,26 +557,29 @@ ignite relayer configure [flags] **Options** ``` - -a, --advanced Advanced configuration options for custom IBC modules - -h, --help help for configure - --keyring-backend string Keyring backend to store your account keys (default "test") - --ordered Set the channel as ordered - --source-account string Source Account - --source-faucet string Faucet address of the source chain - --source-gaslimit int Gas limit used for transactions on source chain - --source-gasprice string Gas price used for transactions on source chain - --source-port string IBC port ID on the source chain - --source-prefix string Address prefix of the source chain - --source-rpc string RPC address of the source chain - --source-version string Module version on the source chain - --target-account string Target Account - --target-faucet string Faucet address of the target chain - --target-gaslimit int Gas limit used for transactions on target chain - --target-gasprice string Gas price used for transactions on target chain - --target-port string IBC port ID on the target chain - --target-prefix string Address prefix of the target chain - --target-rpc string RPC address of the target chain - --target-version string Module version on the target chain + -a, --advanced Advanced configuration options for custom IBC modules + -h, --help help for configure + --keyring-backend string Keyring backend to store your account keys (default "test") + --ordered Set the channel as ordered + -r, --reset Reset the relayer config + --source-account string Source Account + --source-client-id string use a custom client id for source + --source-faucet string Faucet address of the source chain + --source-gaslimit int Gas limit used for transactions on source chain + --source-gasprice string Gas price used for transactions on source chain + --source-port string IBC port ID on the source chain + --source-prefix string Address prefix of the source chain + --source-rpc string RPC address of the source chain + --source-version string Module version on the source chain + --target-account string Target Account + --target-client-id string use a custom client id for target + --target-faucet string Faucet address of the target chain + --target-gaslimit int Gas limit used for transactions on target chain + --target-gasprice string Gas price used for transactions on target chain + --target-port string IBC port ID on the target chain + --target-prefix string Address prefix of the target chain + --target-rpc string RPC address of the target chain + --target-version string Module version on the target chain ``` **SEE ALSO** @@ -647,6 +655,7 @@ ignite scaffold band [queryName] --module [moduleName] [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -h, --help help for band --module string IBC Module to add the packet into -p, --path string path of the app (default ".") @@ -665,19 +674,43 @@ Fully-featured Cosmos SDK blockchain **Synopsis** -Scaffold a new Cosmos SDK blockchain with a default directory structure +Create a new application-specific Cosmos SDK blockchain. + +For example, the following command will create a blockchain called "hello" in the "hello/" directory: + + ignite scaffold chain hello + +A project name can be a simple name or a URL. The name will be used as the Go module path for the project. Examples of project names: + + ignite scaffold chain foo + ignite scaffold chain foo/bar + ignite scaffold chain example.org/foo + ignite scaffold chain github.com/username/foo + +A new directory with source code files will be created in the current directory. To use a different path use the "--path" flag. + +Most of the logic of your blockchain is written in custom modules. Each module effectively encapsulates an independent piece of functionality. Following the Cosmos SDK convention, custom modules are stored inside the "x/" directory. By default, Ignite creates a module with a name that matches the name of the project. To create a blockchain without a default module use the "--no-module" flag. Additional modules can be added after a project is created with "ignite scaffold module" command. + +Account addresses on Cosmos SDK-based blockchains have string prefixes. For example, the Cosmos Hub blockchain uses the default "cosmos" prefix, so that addresses look like this: "cosmos12fjzdtqfrrve7zyg9sv8j25azw2ua6tvu07ypf". To use a custom address prefix use the "--address-prefix" flag. For example: + + ignite scaffold chain foo --address-prefix bar + +By default when compiling a blockchain's source code Ignite creates a cache to speed up the build process. To clear the cache when building a blockchain use the "--clear-cache" flag. It is very unlikely you will ever need to use this flag. + +The blockchain is using the Cosmos SDK modular blockchain framework. Learn more about Cosmos SDK on https://docs.cosmos.network ``` -ignite scaffold chain [github.com/org/repo] [flags] +ignite scaffold chain [name] [flags] ``` **Options** ``` - --address-prefix string Address prefix (default "cosmos") + --address-prefix string Account address prefix (default "cosmos") + --clear-cache Clear the build cache (advanced) -h, --help help for chain - --no-module Prevent scaffolding a default module in the app - -p, --path string path to scaffold the chain (default ".") + --no-module Create a project without a default module + -p, --path string Create a project in a specific path (default ".") ``` **SEE ALSO** @@ -717,6 +750,7 @@ ignite scaffold list NAME [field]... [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -h, --help help for list --module string Module to add into. Default is app's main module --no-message Disable CRUD interaction messages scaffolding @@ -742,6 +776,7 @@ ignite scaffold map NAME [field]... [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -h, --help help for map --index strings fields that index the value (default [index]) --module string Module to add into. Default is app's main module @@ -768,6 +803,7 @@ ignite scaffold message [name] [field1] [field2] ... [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -d, --desc string Description of the command -h, --help help for message --module string Module to add the message into. Default: app's main module @@ -798,6 +834,7 @@ ignite scaffold module [name] [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) --dep strings module dependencies (e.g. --dep account,bank) -h, --help help for module --ibc scaffold an IBC module @@ -829,6 +866,7 @@ ignite scaffold packet [packetName] [field1] [field2] ... --module [moduleName] ``` --ack strings Custom acknowledgment type (field1,field2,...) + --clear-cache Clear the build cache (advanced) -h, --help help for packet --module string IBC Module to add the packet into --no-message Disable send message scaffolding @@ -853,6 +891,7 @@ ignite scaffold query [name] [request_field1] [request_field2] ... [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -d, --desc string Description of the command -h, --help help for query --module string Module to add the query into. Default: app's main module @@ -878,6 +917,7 @@ ignite scaffold single NAME [field]... [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -h, --help help for single --module string Module to add into. Default is app's main module --no-message Disable CRUD interaction messages scaffolding @@ -903,6 +943,7 @@ ignite scaffold type NAME [field]... [flags] **Options** ``` + --clear-cache Clear the build cache (advanced) -h, --help help for type --module string Module to add into. Default is app's main module --no-message Disable CRUD interaction messages scaffolding diff --git a/docs/contributing/index.md b/docs/docs/contributing/01-contributing.md similarity index 97% rename from docs/contributing/index.md rename to docs/docs/contributing/01-contributing.md index 00141223fa..73a5d491ca 100644 --- a/docs/contributing/index.md +++ b/docs/docs/contributing/01-contributing.md @@ -1,14 +1,13 @@ --- -parent: - order: 6 - title: Contributing to Ignite CLI docs +sidebar_position: 1 +slug: /contributing --- # Contributing to Ignite CLI docs Thank you for visiting our repository and considering making contributions. We appreciate your interest in helping us to create and maintain awesome tutorials and documentation. -To set up your environment for success, follow the [technical setup](technical-setup.md) guidelines. +To set up your environment for success, follow the [technical setup](02-technical-setup.md) guidelines. ## Using this repo diff --git a/docs/contributing/technical-setup.md b/docs/docs/contributing/02-technical-setup.md similarity index 94% rename from docs/contributing/technical-setup.md rename to docs/docs/contributing/02-technical-setup.md index 67d2116664..eb4e52a0ea 100644 --- a/docs/contributing/technical-setup.md +++ b/docs/docs/contributing/02-technical-setup.md @@ -1,3 +1,6 @@ +--- +sidebar_position: 1 +--- # Technical setup To ensure you have a successful experience working with our Developer Tutorials content, Ignite recommends this technical setup. @@ -58,4 +61,4 @@ The Z shell, also known as zsh, is a UNIX shell that is built on top of the macO ## Install Go -Follow the steps in [Install Ignite CLI](../guide/install.md) docs to install Ignite CLI and Go. +Follow the steps in [Install Ignite CLI](../guide/01-install.md) docs to install Ignite CLI and Go. diff --git a/docs/docs/contributing/_category_.json b/docs/docs/contributing/_category_.json new file mode 100644 index 0000000000..16abb6c990 --- /dev/null +++ b/docs/docs/contributing/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Contributing to Ignite CLI docs", + "position": 5, + "link": null +} \ No newline at end of file diff --git a/docs/contributing/templates/concept_template.md b/docs/docs/contributing/templates/01-concept_template.md similarity index 97% rename from docs/contributing/templates/concept_template.md rename to docs/docs/contributing/templates/01-concept_template.md index 5d81a5822b..1484756c0f 100644 --- a/docs/contributing/templates/concept_template.md +++ b/docs/docs/contributing/templates/01-concept_template.md @@ -53,7 +53,7 @@ Common requirements for tutorials include: Local software needed, such as Go and Ignite CLI. For example: --> -- [Install Ignite CLI](../starport/index.md) +- [Install Ignite CLI](../../guide/01-install.md) ## Describe diff --git a/docs/contributing/templates/tutorial-template.md b/docs/docs/contributing/templates/02-tutorial-template.md similarity index 98% rename from docs/contributing/templates/tutorial-template.md rename to docs/docs/contributing/templates/02-tutorial-template.md index f71e0bb2d3..40a4ab43df 100644 --- a/docs/contributing/templates/tutorial-template.md +++ b/docs/docs/contributing/templates/02-tutorial-template.md @@ -62,7 +62,7 @@ To complete this tutorial, you will need: + } + + @media (prefers-color-scheme: dark) { + path { + fill: #F8F8FD; + } + } + + + + diff --git a/docs/static/img/favicon.ico b/docs/static/img/favicon.ico new file mode 100644 index 0000000000..f076b10f94 Binary files /dev/null and b/docs/static/img/favicon.ico differ diff --git a/docs/static/img/header-logo-docs-dark.svg b/docs/static/img/header-logo-docs-dark.svg new file mode 100644 index 0000000000..30b874b989 --- /dev/null +++ b/docs/static/img/header-logo-docs-dark.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/static/img/header-logo-docs.svg b/docs/static/img/header-logo-docs.svg new file mode 100644 index 0000000000..9618bac5e3 --- /dev/null +++ b/docs/static/img/header-logo-docs.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/static/img/ico-chevron.svg b/docs/static/img/ico-chevron.svg new file mode 100644 index 0000000000..3f8e8fac11 --- /dev/null +++ b/docs/static/img/ico-chevron.svg @@ -0,0 +1,3 @@ + + + diff --git a/docs/static/img/ico-github.svg b/docs/static/img/ico-github.svg new file mode 100644 index 0000000000..a74bee5aed --- /dev/null +++ b/docs/static/img/ico-github.svg @@ -0,0 +1,3 @@ + + + diff --git a/docs/.vuepress/public/logo.png b/docs/static/img/logo.png similarity index 100% rename from docs/.vuepress/public/logo.png rename to docs/static/img/logo.png diff --git a/docs/static/img/logo.svg b/docs/static/img/logo.svg new file mode 100644 index 0000000000..40210b0f54 --- /dev/null +++ b/docs/static/img/logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/static/img/og-image.jpg b/docs/static/img/og-image.jpg new file mode 100644 index 0000000000..8bfd8c7da1 Binary files /dev/null and b/docs/static/img/og-image.jpg differ diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js new file mode 100644 index 0000000000..4b50bc3ab1 --- /dev/null +++ b/docs/tailwind.config.js @@ -0,0 +1,105 @@ +const defaultTheme = require("tailwindcss/defaultTheme"); + +// Px to REM function (static base of 16) +const pxToRem = (dest) => 1 / (16 / dest); + +// Config +module.exports = { + content: ["./src/**/*.{js,jsx,ts,tsx}"], + corePlugins: { + // preflight: false, // avoid reset all docusaurus css + }, + theme: { + borderRadius: { + none: "0", + xs: `${pxToRem(4)}rem`, + s: `${pxToRem(8)}rem`, + sm: `${pxToRem(10)}rem`, + DEFAULT: `${pxToRem(16)}rem`, + md: `${pxToRem(20)}rem`, + lg: `${pxToRem(100)}rem`, + circle: "100%", + }, + fontFamily: { + termina: ["termina", defaultTheme.fontFamily.sans], + intervar: ['"Inter var"', defaultTheme.fontFamily.sans], + inter: ["Inter", defaultTheme.fontFamily.sans], + jetbrain: ["JetBrains Mono", defaultTheme.fontFamily.mono], + }, + fontSize: { + 0: "0", + 1: [`${pxToRem(10)}rem`], + 2: [`${pxToRem(13)}rem`], + 3: [`${pxToRem(16)}rem`], + 4: [`${pxToRem(21)}rem`], + 5: [`${pxToRem(28)}rem`], + 6: [`${pxToRem(32)}rem`], + 7: [`${pxToRem(38)}rem`], + 8: [`${pxToRem(51)}rem`], + 9: [`${pxToRem(56)}rem`], + 10: [`${pxToRem(76)}rem`], + }, + spacing: { + inherit: "inherit", + auto: "auto", + full: "100%", + px: "1px", + "1/2": "50%", + "1/3": "33.333%", + "2/3": "66.666%", + "1/4": "25%", + "3/4": "75%", + "1/5": "20%", + "2/5": "40%", + "3/5": "60%", + "4/5": "80%", + 0: "0", + 1: ".25rem", + 2: `${pxToRem(6)}rem`, + 3: `${pxToRem(8)}rem`, + 3.5: `${pxToRem(10)}rem`, + 4: `${pxToRem(12)}rem`, + 5: `${pxToRem(16)}rem`, + 5.5: `${pxToRem(20)}rem`, + 6: `${pxToRem(24)}rem`, + 7: `${pxToRem(32)}rem`, + 7.5: `${pxToRem(40)}rem`, + 8: `${pxToRem(48)}rem`, + 8.5: `${pxToRem(52)}rem`, + 9: `${pxToRem(64)}rem`, + 9.5: "5rem", + 9.75: `${pxToRem(84)}rem`, + 10: `${pxToRem(96)}rem`, + 11: `${pxToRem(128)}rem`, + 12: `${pxToRem(144)}rem`, + 13: `${pxToRem(160)}rem`, + 14: `${pxToRem(192)}rem`, + 15: `${pxToRem(208)}rem`, + }, + colors: { + transparent: "transparent", + current: "currentColor", + inherit: "inherit", + gray: { + 0: "#FFFFFF", + 30: "rgba(0, 0, 0, 0.03)", + 1000: "#000000", + }, + card: "#F7F7F7", + border: "rgba(0, 0, 0, 0.07)", + inactive: "rgba(0, 0, 0, 0.33)", + inactiveLight: "rgba(255, 255, 255, 0.44)", + muted: "#555555", + mutedLight: "rgba(255, 255, 255, 0.67)", + fg: "rgba(24, 24, 24, 0.67)", + lightfg: "rgba(24, 24, 24, 0.67)", + link: "#000000", + linkHover: "#555555", + docusaurusColorBase: "var(--ifm-font-color-base)", + docusaurusBgColor: "var(--ifm-background-color)", + docusaurusColorBorder: "var(--ifm-color-emphasis-200)", + }, + extend: {}, + }, + plugins: [], +}; diff --git a/firebase.json b/firebase.json index 7a3c3b2322..b9b518b689 100644 --- a/firebase.json +++ b/firebase.json @@ -7,7 +7,7 @@ }, "hosting": { "target": "docs.ignite.com", - "public": "docs/.vuepress/dist", + "public": "docs/build", "cleanUrls": true } } \ No newline at end of file diff --git a/ignite/internal/tools/gen-cli-docs/main.go b/ignite/internal/tools/gen-cli-docs/main.go index 5ec83ed3aa..425ee821ce 100644 --- a/ignite/internal/tools/gen-cli-docs/main.go +++ b/ignite/internal/tools/gen-cli-docs/main.go @@ -20,11 +20,8 @@ import ( ) const head = `--- -order: 1 -description: Ignite CLI docs. -parent: - order: 8 - title: CLI Reference +sidebar_position: 7 +description: Ignite CLI docs. --- # CLI Reference diff --git a/ignite/templates/module/create/ibc/x/{{moduleName}}/module_ibc.go.plush b/ignite/templates/module/create/ibc/x/{{moduleName}}/module_ibc.go.plush index de8e0cd775..9920760016 100644 --- a/ignite/templates/module/create/ibc/x/{{moduleName}}/module_ibc.go.plush +++ b/ignite/templates/module/create/ibc/x/{{moduleName}}/module_ibc.go.plush @@ -55,25 +55,20 @@ func (am AppModule) OnChanOpenTry( channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, - version, counterpartyVersion string, -) error { +) (string, error) { <%= if (ibcOrdering != "NONE") { %>if order != channeltypes.<%= ibcOrdering %> { - return sdkerrors.Wrapf(channeltypes.ErrInvalidChannelOrdering, "expected %s channel, got %s ", channeltypes.<%= ibcOrdering %>, order) + return "", sdkerrors.Wrapf(channeltypes.ErrInvalidChannelOrdering, "expected %s channel, got %s ", channeltypes.<%= ibcOrdering %>, order) }<% } %> // Require portID is the portID module is bound to boundPort := am.keeper.GetPort(ctx) if boundPort != portID { - return sdkerrors.Wrapf(porttypes.ErrInvalidPort, "invalid port: %s, expected %s", portID, boundPort) - } - - if version != types.Version { - return sdkerrors.Wrapf(types.ErrInvalidVersion, "got: %s, expected %s", version, types.Version) + return "", sdkerrors.Wrapf(porttypes.ErrInvalidPort, "invalid port: %s, expected %s", portID, boundPort) } if counterpartyVersion != types.Version { - return sdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: got: %s, expected %s", counterpartyVersion, types.Version) + return "", sdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: got: %s, expected %s", counterpartyVersion, types.Version) } // Module may have already claimed capability in OnChanOpenInit in the case of crossing hellos @@ -83,11 +78,11 @@ func (am AppModule) OnChanOpenTry( if !am.keeper.AuthenticateCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) { // Only claim channel capability passed back by IBC module if we do not already own it if err := am.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return err + return "", err } } - return nil + return types.Version, nil } // OnChanOpenAck implements the IBCModule interface @@ -95,6 +90,7 @@ func (am AppModule) OnChanOpenAck( ctx sdk.Context, portID, channelID string, + _, counterpartyVersion string, ) error { if counterpartyVersion != types.Version { @@ -236,14 +232,3 @@ func (am AppModule) OnTimeoutPacket( return nil } - -func (am AppModule) NegotiateAppVersion( - ctx sdk.Context, - order channeltypes.Order, - connectionID string, - portID string, - counterparty channeltypes.Counterparty, - proposedVersion string, -) (version string, err error) { - return proposedVersion, nil -} diff --git a/scripts/gen-cli-docs b/scripts/gen-cli-docs index 2da78eaf82..42756982fb 100755 --- a/scripts/gen-cli-docs +++ b/scripts/gen-cli-docs @@ -1,3 +1,3 @@ #!/bin/bash -go run ignite/internal/tools/gen-cli-docs/*.go --out docs/cli/index.md +go run ignite/internal/tools/gen-cli-docs/*.go --out docs/docs/07-cli.md