From a19a3fd5e7c9dcb19d9e60dfc68af30510c3f6cc Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 7 Nov 2024 10:56:42 +0100 Subject: [PATCH] docs: fix dead links --- contributing.md | 4 - docs/docs/02-guide/04-ibc.md | 172 +++++++++--------- docs/docs/06-migration/v0.24.0.md | 2 +- .../versioned_docs/version-v0.25/06-bounty.md | 2 +- .../version-v0.25/guide/07-ibc.md | 2 +- .../version-v0.25/kb/04-genesis.md | 2 +- .../version-v0.25/migration/v0.24.0.md | 2 +- .../version-v0.26/02-guide/06-ibc.md | 2 +- .../version-v0.26/06-migration/v0.24.0.md | 2 +- .../version-v0.27/02-guide/06-ibc.md | 2 +- .../version-v0.27/06-migration/v0.24.0.md | 2 +- .../version-v28/02-guide/06-ibc.md | 2 +- .../version-v28/06-migration/v0.24.0.md | 2 +- readme.md | 4 +- 14 files changed, 99 insertions(+), 103 deletions(-) diff --git a/contributing.md b/contributing.md index 33986a3e29..9bcce68ee3 100644 --- a/contributing.md +++ b/contributing.md @@ -4,8 +4,6 @@ Before submitting a PR to the Ignite CLI repository, please review and follow th If you have suggestions or want to propose changes to these guidelines, start a new [Discussion topic](https://github.com/ignite/cli/discussions/new) to gather feedback. -For setup instructions, see [Set Up Your Ignite CLI Development Environment](dev-env-setup.md). - To contribute to docs and tutorials, see [Contributing to Ignite CLI Docs](https://docs.ignite.com/contributing). We appreciate your contribution! @@ -120,8 +118,6 @@ We use Git Flow as our branch strategy, with each MAJOR release linked to a mile - **Next Milestone:** The **Next** milestone is used for issues or features that are not tied to a specific release but are still relevant to the project’s roadmap. These issues will be addressed when higher-priority work has been completed, or as part of future planning. -Check the [project board](https://github.com/ignite/cli/projects/7) to see what we're working on and what’s planned. - ## Issue Title Conventions and Labeling To maintain consistency across issues and PRs, follow these guidelines for issue titles: diff --git a/docs/docs/02-guide/04-ibc.md b/docs/docs/02-guide/04-ibc.md index 4813c51983..6dea8c93ca 100644 --- a/docs/docs/02-guide/04-ibc.md +++ b/docs/docs/02-guide/04-ibc.md @@ -26,7 +26,7 @@ end-to-end, connection-oriented, stateful protocol provides reliable, ordered, and authenticated communication between heterogeneous blockchains. The [IBC protocol in the Cosmos -SDK](https://ibc.cosmos.network/main/ibc/overview.html) is the standard for the +SDK](https://ibc.cosmos.network/main/ibc/overview) is the standard for the interaction between two blockchains. The IBCmodule interface defines how packets and messages are constructed to be interpreted by the sending and the receiving blockchain. @@ -223,48 +223,48 @@ the `msg.Creator` value to the IBC `packet`. package keeper func (k msgServer) SendIbcPost(goCtx context.Context, msg *types.MsgSendIbcPost) (*types.MsgSendIbcPostResponse, error) { - // validate incoming message - if _, err := k.addressCodec.StringToBytes(msg.Creator); err != nil { - return nil, errorsmod.Wrap(sdkerrors.ErrInvalidAddress, fmt.Sprintf("invalid address: %s", err)) - } - - if msg.Port == "" { - return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid packet port") - } - - if msg.ChannelID == "" { - return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid packet channel") - } - - if msg.TimeoutTimestamp == 0 { - return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid packet timeout") - } - - // TODO: logic before transmitting the packet - - // Construct the packet - var packet types.IbcPostPacketData - - packet.Title = msg.Title - packet.Content = msg.Content - // highlight-next-line - packet.Creator = msg.Creator - - // Transmit the packet - ctx := sdk.UnwrapSDKContext(goCtx) - _, err := k.TransmitIbcPostPacket( - ctx, - packet, - msg.Port, - msg.ChannelID, - clienttypes.ZeroHeight(), - msg.TimeoutTimestamp, - ) - if err != nil { - return nil, err - } - - return &types.MsgSendIbcPostResponse{}, nil + // validate incoming message + if _, err := k.addressCodec.StringToBytes(msg.Creator); err != nil { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidAddress, fmt.Sprintf("invalid address: %s", err)) + } + + if msg.Port == "" { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid packet port") + } + + if msg.ChannelID == "" { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid packet channel") + } + + if msg.TimeoutTimestamp == 0 { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid packet timeout") + } + + // TODO: logic before transmitting the packet + + // Construct the packet + var packet types.IbcPostPacketData + + packet.Title = msg.Title + packet.Content = msg.Content + // highlight-next-line + packet.Creator = msg.Creator + + // Transmit the packet + ctx := sdk.UnwrapSDKContext(goCtx) + _, err := k.TransmitIbcPostPacket( + ctx, + packet, + msg.Port, + msg.ChannelID, + clienttypes.ZeroHeight(), + msg.TimeoutTimestamp, + ) + if err != nil { + return nil, err + } + + return &types.MsgSendIbcPostResponse{}, nil } ``` @@ -315,11 +315,11 @@ Then modify the `OnRecvIbcPostPacket` keeper function with the following code: package keeper func (k Keeper) OnRecvIbcPostPacket(ctx sdk.Context, packet channeltypes.Packet, data types.IbcPostPacketData) (packetAck types.IbcPostPacketAck, err error) { - packetAck.PostId, err = k.PostSeq.Next(ctx) - if err != nil { - return packetAck, err - } - return packetAck, k.Post.Set(ctx, packetAck.PostId, types.Post{Title: data.Title, Content: data.Content}) + packetAck.PostId, err = k.PostSeq.Next(ctx) + if err != nil { + return packetAck, err + } + return packetAck, k.Post.Set(ctx, packetAck.PostId, types.Post{Title: data.Title, Content: data.Content}) } ``` @@ -339,33 +339,33 @@ from the packet. package keeper func (k Keeper) OnAcknowledgementIbcPostPacket(ctx sdk.Context, packet channeltypes.Packet, data types.IbcPostPacketData, ack channeltypes.Acknowledgement) error { - switch dispatchedAck := ack.Response.(type) { - case *channeltypes.Acknowledgement_Error: - // We will not treat acknowledgment error in this tutorial - return nil - case *channeltypes.Acknowledgement_Result: - // Decode the packet acknowledgment - var packetAck types.IbcPostPacketAck - if err := types.ModuleCdc.UnmarshalJSON(dispatchedAck.Result, &packetAck); err != nil { - // The counter-party module doesn't implement the correct acknowledgment format - return errors.New("cannot unmarshal acknowledgment") - } - - seq, err := k.SentPostSeq.Next(ctx) - if err != nil { - return err - } - - return k.SentPost.Set(ctx, seq, - types.SentPost{ - PostId: packetAck.PostId, - Title: data.Title, - Chain: packet.DestinationPort + "-" + packet.DestinationChannel, - }, - ) - default: - return errors.New("the counter-party module does not implement the correct acknowledgment format") - } + switch dispatchedAck := ack.Response.(type) { + case *channeltypes.Acknowledgement_Error: + // We will not treat acknowledgment error in this tutorial + return nil + case *channeltypes.Acknowledgement_Result: + // Decode the packet acknowledgment + var packetAck types.IbcPostPacketAck + if err := types.ModuleCdc.UnmarshalJSON(dispatchedAck.Result, &packetAck); err != nil { + // The counter-party module doesn't implement the correct acknowledgment format + return errors.New("cannot unmarshal acknowledgment") + } + + seq, err := k.SentPostSeq.Next(ctx) + if err != nil { + return err + } + + return k.SentPost.Set(ctx, seq, + types.SentPost{ + PostId: packetAck.PostId, + Title: data.Title, + Chain: packet.DestinationPort + "-" + packet.DestinationChannel, + }, + ) + default: + return errors.New("the counter-party module does not implement the correct acknowledgment format") + } } ``` @@ -376,17 +376,17 @@ posts. This logic follows the same format as `sentPost`. ```go title="x/blog/keeper/ibc_post.go" func (k Keeper) OnTimeoutIbcPostPacket(ctx sdk.Context, packet channeltypes.Packet, data types.IbcPostPacketData) error { - seq, err := k.TimeoutPostSeq.Next(ctx) - if err != nil { - return err - } - - return k.TimeoutPost.Set(ctx, seq, - types.TimeoutPost{ - Title: data.Title, - Chain: packet.DestinationPort + "-" + packet.DestinationChannel, - }, - ) + seq, err := k.TimeoutPostSeq.Next(ctx) + if err != nil { + return err + } + + return k.TimeoutPost.Set(ctx, seq, + types.TimeoutPost{ + Title: data.Title, + Chain: packet.DestinationPort + "-" + packet.DestinationChannel, + }, + ) } ``` diff --git a/docs/docs/06-migration/v0.24.0.md b/docs/docs/06-migration/v0.24.0.md index 7b803cce85..e927bd2ce3 100644 --- a/docs/docs/06-migration/v0.24.0.md +++ b/docs/docs/06-migration/v0.24.0.md @@ -193,7 +193,7 @@ If you have IBC-enabled modules (for example, added with `ignite scaffold module the following changes to the source code. Cosmos SDK expects IBC modules -to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule.html). Create a `IBCModule` +to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule/). Create a `IBCModule` type that embeds the module's keeper and a method that returns a new `IBCModule`. Methods in this file will be defined on this type. diff --git a/docs/versioned_docs/version-v0.25/06-bounty.md b/docs/versioned_docs/version-v0.25/06-bounty.md index 1f35c86fd7..e8648d9547 100644 --- a/docs/versioned_docs/version-v0.25/06-bounty.md +++ b/docs/versioned_docs/version-v0.25/06-bounty.md @@ -7,7 +7,7 @@ description: Ignite CLI bounty program incentives and rewards. Our Ignite CLI bounty program provides incentives for your participation and pays rewards. If you know Golang, follow the bounty issues, write code, close issues, and get rewarded. -Do your bounty hunting in our repo. Track new, in-progress, and completed bounties on the [Bounty board](https://github.com/ignite/cli/projects/5) in GitHub. +Do your bounty hunting in our repo. Track new, in-progress, and completed bounties in the [GitHub Issues](https://github.com/ignite/cli/issues?q=is%3Aissue+is%3Aopen+label%3Abounty). For details on the Ignite CLI bounty program, join the #bounty channel in [Ignite Discord](https://discord.com/invite/ignite). diff --git a/docs/versioned_docs/version-v0.25/guide/07-ibc.md b/docs/versioned_docs/version-v0.25/guide/07-ibc.md index 442d116e72..665d6041eb 100644 --- a/docs/versioned_docs/version-v0.25/guide/07-ibc.md +++ b/docs/versioned_docs/version-v0.25/guide/07-ibc.md @@ -18,7 +18,7 @@ The Inter-Blockchain Communication protocol (IBC) is an important part of the Co The Inter-Blockchain Communication protocol (IBC) allows blockchains to talk to each other. IBC handles transport across different sovereign blockchains. This end-to-end, connection-oriented, stateful protocol provides reliable, ordered, and authenticated communication between heterogeneous blockchains. -The [IBC protocol in the Cosmos SDK](https://ibc.cosmos.network/main/ibc/overview.html) is the standard for the interaction between two blockchains. The IBCmodule interface defines how packets and messages are constructed to be interpreted by the sending and the receiving blockchain. +The [IBC protocol in the Cosmos SDK](https://ibc.cosmos.network/main/ibc/overview) is the standard for the interaction between two blockchains. The IBCmodule interface defines how packets and messages are constructed to be interpreted by the sending and the receiving blockchain. The IBC relayer lets you connect between sets of IBC-enabled chains. This tutorial teaches you how to create two blockchains and then start and use the relayer with Ignite CLI to connect two blockchains. diff --git a/docs/versioned_docs/version-v0.25/kb/04-genesis.md b/docs/versioned_docs/version-v0.25/kb/04-genesis.md index f4333dcda4..e394a75a31 100644 --- a/docs/versioned_docs/version-v0.25/kb/04-genesis.md +++ b/docs/versioned_docs/version-v0.25/kb/04-genesis.md @@ -34,7 +34,7 @@ genesis: ## Genesis file -For genesis file details and field definitions, see Cosmos Hub documentation for the [Genesis File](https://hub.cosmos.network/resources/genesis). +For genesis file details and field definitions, see Cosmos Hub documentation for the [Genesis File](https://hub.cosmos.network/main/resources/genesis). ## Genesis block summary diff --git a/docs/versioned_docs/version-v0.25/migration/v0.24.0.md b/docs/versioned_docs/version-v0.25/migration/v0.24.0.md index 1092f97005..bab313c73e 100644 --- a/docs/versioned_docs/version-v0.25/migration/v0.24.0.md +++ b/docs/versioned_docs/version-v0.25/migration/v0.24.0.md @@ -193,7 +193,7 @@ If you have IBC-enabled modules (for example, added with `ignite scaffold module the following changes to the source code. Cosmos SDK expects IBC modules -to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule.html). Create a `IBCModule` +to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule/). Create a `IBCModule` type that embeds the module's keeper and a method that returns a new `IBCModule`. Methods in this file will be defined on this type. diff --git a/docs/versioned_docs/version-v0.26/02-guide/06-ibc.md b/docs/versioned_docs/version-v0.26/02-guide/06-ibc.md index 9f1973adc5..ec728eac2b 100644 --- a/docs/versioned_docs/version-v0.26/02-guide/06-ibc.md +++ b/docs/versioned_docs/version-v0.26/02-guide/06-ibc.md @@ -26,7 +26,7 @@ end-to-end, connection-oriented, stateful protocol provides reliable, ordered, and authenticated communication between heterogeneous blockchains. The [IBC protocol in the Cosmos -SDK](https://ibc.cosmos.network/main/ibc/overview.html) is the standard for the +SDK](https://ibc.cosmos.network/main/ibc/overview) is the standard for the interaction between two blockchains. The IBCmodule interface defines how packets and messages are constructed to be interpreted by the sending and the receiving blockchain. diff --git a/docs/versioned_docs/version-v0.26/06-migration/v0.24.0.md b/docs/versioned_docs/version-v0.26/06-migration/v0.24.0.md index bcf1b85185..cddcb184e3 100644 --- a/docs/versioned_docs/version-v0.26/06-migration/v0.24.0.md +++ b/docs/versioned_docs/version-v0.26/06-migration/v0.24.0.md @@ -193,7 +193,7 @@ If you have IBC-enabled modules (for example, added with `ignite scaffold module the following changes to the source code. Cosmos SDK expects IBC modules -to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule.html). Create a `IBCModule` +to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule/). Create a `IBCModule` type that embeds the module's keeper and a method that returns a new `IBCModule`. Methods in this file will be defined on this type. diff --git a/docs/versioned_docs/version-v0.27/02-guide/06-ibc.md b/docs/versioned_docs/version-v0.27/02-guide/06-ibc.md index 13d4d6fce4..1ca81ee43f 100644 --- a/docs/versioned_docs/version-v0.27/02-guide/06-ibc.md +++ b/docs/versioned_docs/version-v0.27/02-guide/06-ibc.md @@ -26,7 +26,7 @@ end-to-end, connection-oriented, stateful protocol provides reliable, ordered, and authenticated communication between heterogeneous blockchains. The [IBC protocol in the Cosmos -SDK](https://ibc.cosmos.network/main/ibc/overview.html) is the standard for the +SDK](https://ibc.cosmos.network/main/ibc/overview) is the standard for the interaction between two blockchains. The IBCmodule interface defines how packets and messages are constructed to be interpreted by the sending and the receiving blockchain. diff --git a/docs/versioned_docs/version-v0.27/06-migration/v0.24.0.md b/docs/versioned_docs/version-v0.27/06-migration/v0.24.0.md index bcf1b85185..cddcb184e3 100644 --- a/docs/versioned_docs/version-v0.27/06-migration/v0.24.0.md +++ b/docs/versioned_docs/version-v0.27/06-migration/v0.24.0.md @@ -193,7 +193,7 @@ If you have IBC-enabled modules (for example, added with `ignite scaffold module the following changes to the source code. Cosmos SDK expects IBC modules -to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule.html). Create a `IBCModule` +to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule/). Create a `IBCModule` type that embeds the module's keeper and a method that returns a new `IBCModule`. Methods in this file will be defined on this type. diff --git a/docs/versioned_docs/version-v28/02-guide/06-ibc.md b/docs/versioned_docs/version-v28/02-guide/06-ibc.md index 4c4f426351..7a0bb5e718 100644 --- a/docs/versioned_docs/version-v28/02-guide/06-ibc.md +++ b/docs/versioned_docs/version-v28/02-guide/06-ibc.md @@ -26,7 +26,7 @@ end-to-end, connection-oriented, stateful protocol provides reliable, ordered, and authenticated communication between heterogeneous blockchains. The [IBC protocol in the Cosmos -SDK](https://ibc.cosmos.network/main/ibc/overview.html) is the standard for the +SDK](https://ibc.cosmos.network/main/ibc/overview) is the standard for the interaction between two blockchains. The IBCmodule interface defines how packets and messages are constructed to be interpreted by the sending and the receiving blockchain. diff --git a/docs/versioned_docs/version-v28/06-migration/v0.24.0.md b/docs/versioned_docs/version-v28/06-migration/v0.24.0.md index 7b803cce85..e927bd2ce3 100644 --- a/docs/versioned_docs/version-v28/06-migration/v0.24.0.md +++ b/docs/versioned_docs/version-v28/06-migration/v0.24.0.md @@ -193,7 +193,7 @@ If you have IBC-enabled modules (for example, added with `ignite scaffold module the following changes to the source code. Cosmos SDK expects IBC modules -to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule.html). Create a `IBCModule` +to [implement the `IBCModule` interface](https://ibc.cosmos.network/main/ibc/apps/ibcmodule/). Create a `IBCModule` type that embeds the module's keeper and a method that returns a new `IBCModule`. Methods in this file will be defined on this type. diff --git a/readme.md b/readme.md index 7dd6fb1e6a..b1ab401ef8 100644 --- a/readme.md +++ b/readme.md @@ -253,8 +253,8 @@ create a pull request, or maintain your own fork and submit a cross-repository pull request. Our Ignite CLI bounty program provides incentives for your participation and -pays rewards. Track new, in-progress, and completed bounties on the [Bounty -board](https://github.com/ignite/cli/projects/5) in GitHub. +pays rewards. Track new, in-progress, and completed bounties in the [GitHub Issues +board](https://github.com/ignite/cli/issues?q=is%3Aissue+is%3Aopen+label%3Abounty). **Important** Before you start implementing a new Ignite CLI feature, the first step is to create an issue on GitHub that describes the proposed changes.