Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: migration docs for transfer multidenom #6393

Merged
merged 8 commits into from
Jul 1, 2024

Conversation

crodriguezvega
Copy link
Contributor

@crodriguezvega crodriguezvega commented May 27, 2024

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

Summary by CodeRabbit

  • New Features

    • Added support for multi-token transfers in the transfer module.
  • Documentation

    • Updated migration guide from v8 to v9 to reflect changes in multi-token transfer functionality.

Copy link
Contributor

coderabbitai bot commented May 27, 2024

Walkthrough

The recent updates focus on enhancing the ICS20 - Transfer module to support multi-token transfers. This involves modifying the NewMsgTransfer constructor to handle multiple coins and updating related events to include a tokens attribute instead of separate denom and amount attributes. These changes are reflected in the documentation and the CHANGELOG.md file, ensuring the new multi-token transfer capability is well-documented and clear to users.

Changes

File Path Change Summary
docs/docs/05-migrations/13-v8-to-v9.md Updated migration guide to reflect changes in NewMsgTransfer for multi-token support.
CHANGELOG.md Added a summary of the new multi-token transfer feature in the apps/transfer module.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant ICS20_Module as ICS20 - Transfer Module
    participant EventSystem as Event System

    User->>ICS20_Module: Call NewMsgTransfer with multiple tokens
    ICS20_Module-->>User: Return MsgTransfer object
    ICS20_Module->>EventSystem: Emit ibc_transfer event with tokens attribute
    EventSystem-->>User: Notify about ibc_transfer event
Loading

Possibly related issues


Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI gpt-4o model for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are currently opted into early access features by default.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (1)
docs/docs/05-migrations/13-v8-to-v9.md (1)

Line range hint 136-136: Add an article for clarity.

- as reference
+ as a reference
Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between dcf6e34 and 8ba220d.
Files selected for processing (1)
  • docs/docs/05-migrations/13-v8-to-v9.md (1 hunks)
Additional Context Used
LanguageTool (1)
docs/docs/05-migrations/13-v8-to-v9.md (1)

Near line 136: You might be missing the article “a” here.
Context: ...r 07-tendermint may also be useful as reference. ### 06-solomachine The Initialize,...
Rule ID: AI_EN_LECTOR_MISSING_DETERMINER_A

Markdownlint (4)
docs/docs/05-migrations/13-v8-to-v9.md (4)

35: Expected: 0 or 2; Actual: 1
Trailing spaces


36: Expected: 0 or 2; Actual: 1
Trailing spaces


97: Column: 34
Hard tabs


8: null
Multiple top-level headings in the same document

Path-based Instructions (1)
docs/docs/05-migrations/13-v8-to-v9.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

Additional comments not posted (1)
docs/docs/05-migrations/13-v8-to-v9.md (1)

76-85: Ensure the updated function signature is correctly reflected across all relevant documentation and code.

Verification successful

The updated function signature for NewMsgTransfer is correctly reflected across all relevant documentation and code.

  • All instances of NewMsgTransfer in the codebase use sdk.NewCoins, which matches the new function signature.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all function calls to `NewMsgTransfer` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go $'NewMsgTransfer'

Length of output: 10110

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (3)
docs/docs/05-migrations/13-v8-to-v9.md (3)

Line range hint 8-8: Multiple top-level headings detected.

Consider using only one top-level heading to improve document structure and readability.


Line range hint 35-36: Remove trailing spaces.

Trailing spaces on lines 35 and 36 should be removed to adhere to markdown best practices.


Line range hint 97-97: Replace hard tabs with spaces.

Hard tabs detected on line 97. Replace with spaces for consistency in indentation.

Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 8ba220d and e26896a.
Files selected for processing (1)
  • docs/docs/05-migrations/13-v8-to-v9.md (1 hunks)
Additional Context Used
Markdownlint (4)
docs/docs/05-migrations/13-v8-to-v9.md (4)

35: Expected: 0 or 2; Actual: 1
Trailing spaces


36: Expected: 0 or 2; Actual: 1
Trailing spaces


97: Column: 34
Hard tabs


8: null
Multiple top-level headings in the same document

Path-based Instructions (1)
docs/docs/05-migrations/13-v8-to-v9.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

Additional comments not posted (1)
docs/docs/05-migrations/13-v8-to-v9.md (1)

76-85: Ensure the updated function signature is reflected across all codebases.

Verification successful

All instances of NewMsgTransfer in the codebase match the new function signature, using sdk.Coins instead of sdk.Coin for the tokens parameter.

  • modules/apps/transfer/transfer_test.go
  • modules/apps/transfer/types/transfer_authorization_test.go
  • modules/apps/transfer/types/msgs_test.go
  • modules/apps/transfer/keeper/relay_test.go
  • modules/apps/transfer/keeper/msg_server_test.go
  • modules/apps/transfer/keeper/mbt_relay_test.go
  • modules/apps/transfer/keeper/invariants_test.go
  • modules/apps/transfer/client/cli/tx.go
  • modules/apps/transfer/types/msgs.go
  • modules/apps/callbacks/transfer_test.go
  • modules/apps/callbacks/replay_test.go
  • modules/apps/callbacks/ibc_middleware_test.go
  • modules/apps/29-fee/transfer_test.go
  • modules/apps/29-fee/keeper/events_test.go
  • modules/apps/27-interchain-accounts/host/keeper/relay_test.go
  • e2e/tests/transfer/incentivized_test.go
  • e2e/tests/transfer/upgrades_test.go
  • e2e/tests/upgrades/upgrade_test.go
  • e2e/tests/transfer/authz_test.go
  • e2e/testsuite/tx.go
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all function calls to `NewMsgTransfer` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go $'NewMsgTransfer'

Length of output: 10110

)
```

- The `ibc_transfer` and `fungible_token_packet` events do not include the attributes `denom` and `amount` anymore; instead they include the attribute `tokens` with the list of coins transferred in the packet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update event documentation to reflect attribute changes.

The documentation mentions that ibc_transfer and fungible_token_packet events now include the tokens attribute instead of denom and amount. However, both attributes are still present in the codebase. Update the documentation or the code to ensure consistency.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between e26896a and 909d129.
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
Additional Context Used
Path-based Instructions (1)
CHANGELOG.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

@crodriguezvega crodriguezvega marked this pull request as draft May 31, 2024 11:55
@crodriguezvega crodriguezvega marked this pull request as ready for review June 28, 2024 12:43
@crodriguezvega crodriguezvega added the priority PRs that need prompt reviews label Jun 28, 2024
Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thank you @crodriguezvega! Appreciate the attention to detail!

@crodriguezvega crodriguezvega added this pull request to the merge queue Jul 1, 2024
Merged via the queue into main with commit 3456ac3 Jul 1, 2024
26 checks passed
@crodriguezvega crodriguezvega deleted the carlos/ics20-v2-multidenom-migration-docs branch July 1, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority PRs that need prompt reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants