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

refactor: rename onCrosschainCall and zContext #349

Merged
merged 8 commits into from
Oct 15, 2024

Conversation

skosito
Copy link
Contributor

@skosito skosito commented Sep 12, 2024

closes: #345

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced MessageContext struct for enhanced message handling in cross-chain interactions.
    • Updated function signatures in the GatewayZEVM and IGatewayZEVM contracts to utilize MessageContext.
    • Added new test cases to validate contract behavior under various conditions.
  • Bug Fixes

    • Improved handling of zero addresses and insufficient amounts in contract operations.
  • Documentation

    • Updated documentation to reflect changes in context handling and added references to MessageContext.
    • Revised links to point to the latest commits in the documentation for various contracts and interfaces.
  • Tests

    • Refactored tests to accommodate the new MessageContext structure, ensuring compatibility with updated function signatures.

Copy link
Contributor

coderabbitai bot commented Sep 12, 2024

Caution

Review failed

The pull request is closed.

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes primarily involve the renaming of the zContext type to MessageContext across various contracts and interfaces, particularly in the GatewayZEVM and UniversalContract. The method onCrossChainCall has been renamed to onCall, reflecting a shift in handling cross-chain interactions. The updates enhance the clarity of function signatures and improve the structure of message-related data utilized in cross-chain communications.

Changes

File(s) Change Summary
v2/contracts/zevm/GatewayZEVM.sol, v2/contracts/zevm/interfaces/IGatewayZEVM.sol Renamed zContext to MessageContext in function signatures for execute and depositAndCall.
v2/contracts/zevm/interfaces/UniversalContract.sol Renamed onCrossChainCall to onCall and updated parameter type from zContext to MessageContext.
v2/test/GatewayZEVM.t.sol, v2/test/utils/TestUniversalContract.sol Refactored tests to use MessageContext instead of zContext in relevant test functions.
v2/test/utils/upgrades/GatewayZEVMUpgradeTest.sol Updated parameter types from zContext to MessageContext and modified event names and visibility.

Assessment against linked issues

Objective Addressed Explanation
Rename onCrossChainCall to onCall and zContext to messageContext (#345)

Possibly related issues

Suggested reviewers

  • fadeev
  • CharlieMc0
  • andresaiello
  • brewmaster012
  • lumtis
  • fbac

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.95%. Comparing base (f7f6d9f) to head (9eb0897).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #349   +/-   ##
=======================================
  Coverage   84.95%   84.95%           
=======================================
  Files           8        8           
  Lines         412      412           
  Branches      138      138           
=======================================
  Hits          350      350           
  Misses         62       62           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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: 2

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 292d235 and bef2648.

Files ignored due to path filters (22)
  • v2/pkg/gatewayevmzevm.t.sol/gatewayevmzevmtest.go is excluded by !v2/pkg/**
  • v2/pkg/gatewayzevm.sol/gatewayzevm.go is excluded by !v2/pkg/**
  • v2/pkg/gatewayzevm.t.sol/gatewayzevminboundtest.go is excluded by !v2/pkg/**
  • v2/pkg/gatewayzevm.t.sol/gatewayzevmoutboundtest.go is excluded by !v2/pkg/**
  • v2/pkg/igatewayzevm.sol/igatewayzevm.go is excluded by !v2/pkg/**
  • v2/pkg/senderzevm.sol/senderzevm.go is excluded by !v2/pkg/**
  • v2/pkg/systemcontract.sol/systemcontract.go is excluded by !v2/pkg/**
  • v2/pkg/systemcontractmock.sol/systemcontractmock.go is excluded by !v2/pkg/**
  • v2/pkg/testuniversalcontract.sol/testuniversalcontract.go is excluded by !v2/pkg/**
  • v2/pkg/universalcontract.sol/universalcontract.go is excluded by !v2/pkg/**
  • v2/pkg/zrc20.t.sol/zrc20test.go is excluded by !v2/pkg/**
  • v2/types/GatewayZEVM.ts is excluded by !v2/types/**
  • v2/types/IGatewayZEVM.sol/IGatewayZEVM.ts is excluded by !v2/types/**
  • v2/types/TestUniversalContract.ts is excluded by !v2/types/**
  • v2/types/UniversalContract.sol/UniversalContract.ts is excluded by !v2/types/**
  • v2/types/factories/GatewayZEVM__factory.ts is excluded by !v2/types/**
  • v2/types/factories/IGatewayZEVM.sol/IGatewayZEVM__factory.ts is excluded by !v2/types/**
  • v2/types/factories/SenderZEVM__factory.ts is excluded by !v2/types/**
  • v2/types/factories/SystemContract.sol/SystemContract__factory.ts is excluded by !v2/types/**
  • v2/types/factories/SystemContractMock.sol/SystemContractMock__factory.ts is excluded by !v2/types/**
  • v2/types/factories/TestUniversalContract__factory.ts is excluded by !v2/types/**
  • v2/types/factories/UniversalContract.sol/UniversalContract__factory.ts is excluded by !v2/types/**
Files selected for processing (43)
  • v2/contracts/zevm/GatewayZEVM.sol (7 hunks)
  • v2/contracts/zevm/interfaces/IGatewayZEVM.sol (3 hunks)
  • v2/contracts/zevm/interfaces/UniversalContract.sol (2 hunks)
  • v2/docs/src/SUMMARY.md (1 hunks)
  • v2/docs/src/contracts/Revert.sol/interface.Revertable.md (1 hunks)
  • v2/docs/src/contracts/Revert.sol/struct.RevertContext.md (1 hunks)
  • v2/docs/src/contracts/Revert.sol/struct.RevertOptions.md (1 hunks)
  • v2/docs/src/contracts/evm/ERC20Custody.sol/contract.ERC20Custody.md (1 hunks)
  • v2/docs/src/contracts/evm/GatewayEVM.sol/contract.GatewayEVM.md (1 hunks)
  • v2/docs/src/contracts/evm/ZetaConnectorBase.sol/abstract.ZetaConnectorBase.md (1 hunks)
  • v2/docs/src/contracts/evm/ZetaConnectorNative.sol/contract.ZetaConnectorNative.md (1 hunks)
  • v2/docs/src/contracts/evm/ZetaConnectorNonNative.sol/contract.ZetaConnectorNonNative.md (1 hunks)
  • v2/docs/src/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20Custody.md (1 hunks)
  • v2/docs/src/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyErrors.md (1 hunks)
  • v2/docs/src/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyEvents.md (1 hunks)
  • v2/docs/src/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVM.md (1 hunks)
  • v2/docs/src/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMErrors.md (1 hunks)
  • v2/docs/src/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMEvents.md (1 hunks)
  • v2/docs/src/contracts/evm/interfaces/IZetaConnector.sol/interface.IZetaConnectorEvents.md (1 hunks)
  • v2/docs/src/contracts/evm/interfaces/IZetaNonEthNew.sol/interface.IZetaNonEthNew.md (1 hunks)
  • v2/docs/src/contracts/zevm/GatewayZEVM.sol/contract.GatewayZEVM.md (7 hunks)
  • v2/docs/src/contracts/zevm/ZRC20.sol/contract.ZRC20.md (1 hunks)
  • v2/docs/src/contracts/zevm/ZRC20.sol/interface.ZRC20Errors.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVM.md (6 hunks)
  • v2/docs/src/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMErrors.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMEvents.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/ISystem.sol/interface.ISystem.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/IWZETA.sol/interface.IWETH9.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20Metadata.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.ZRC20Events.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/README.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/UniversalContract.sol/interface.UniversalContract.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md (1 hunks)
  • v2/docs/src/contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md (1 hunks)
  • v2/docs/src/index.md (1 hunks)
  • v2/lib/forge-std (1 hunks)
  • v2/lib/openzeppelin-contracts-upgradeable (1 hunks)
  • v2/lib/openzeppelin-foundry-upgrades (1 hunks)
  • v2/test/GatewayZEVM.t.sol (20 hunks)
  • v2/test/utils/TestUniversalContract.sol (1 hunks)
Files skipped from review due to trivial changes (33)
  • v2/contracts/zevm/interfaces/IGatewayZEVM.sol
  • v2/docs/src/contracts/Revert.sol/interface.Revertable.md
  • v2/docs/src/contracts/Revert.sol/struct.RevertContext.md
  • v2/docs/src/contracts/Revert.sol/struct.RevertOptions.md
  • v2/docs/src/contracts/evm/ERC20Custody.sol/contract.ERC20Custody.md
  • v2/docs/src/contracts/evm/GatewayEVM.sol/contract.GatewayEVM.md
  • v2/docs/src/contracts/evm/ZetaConnectorBase.sol/abstract.ZetaConnectorBase.md
  • v2/docs/src/contracts/evm/ZetaConnectorNative.sol/contract.ZetaConnectorNative.md
  • v2/docs/src/contracts/evm/ZetaConnectorNonNative.sol/contract.ZetaConnectorNonNative.md
  • v2/docs/src/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20Custody.md
  • v2/docs/src/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyErrors.md
  • v2/docs/src/contracts/evm/interfaces/IERC20Custody.sol/interface.IERC20CustodyEvents.md
  • v2/docs/src/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVM.md
  • v2/docs/src/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMErrors.md
  • v2/docs/src/contracts/evm/interfaces/IGatewayEVM.sol/interface.IGatewayEVMEvents.md
  • v2/docs/src/contracts/evm/interfaces/IZetaConnector.sol/interface.IZetaConnectorEvents.md
  • v2/docs/src/contracts/evm/interfaces/IZetaNonEthNew.sol/interface.IZetaNonEthNew.md
  • v2/docs/src/contracts/zevm/ZRC20.sol/contract.ZRC20.md
  • v2/docs/src/contracts/zevm/ZRC20.sol/interface.ZRC20Errors.md
  • v2/docs/src/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMErrors.md
  • v2/docs/src/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVMEvents.md
  • v2/docs/src/contracts/zevm/interfaces/ISystem.sol/interface.ISystem.md
  • v2/docs/src/contracts/zevm/interfaces/IWZETA.sol/interface.IWETH9.md
  • v2/docs/src/contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md
  • v2/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20.md
  • v2/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.IZRC20Metadata.md
  • v2/docs/src/contracts/zevm/interfaces/IZRC20.sol/interface.ZRC20Events.md
  • v2/docs/src/contracts/zevm/interfaces/README.md
  • v2/docs/src/contracts/zevm/interfaces/UniversalContract.sol/interface.UniversalContract.md
  • v2/docs/src/contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md
  • v2/docs/src/contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md
  • v2/lib/openzeppelin-contracts-upgradeable
  • v2/lib/openzeppelin-foundry-upgrades
Additional context used
Markdownlint
v2/docs/src/SUMMARY.md

32-32: Expected: 4; Actual: 6
Unordered list indentation

(MD007, ul-indent)

v2/docs/src/index.md

98-98: Expected: 4; Actual: 6
Unordered list indentation

(MD007, ul-indent)

v2/docs/src/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVM.md

224-224: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

Additional comments not posted (37)
v2/lib/forge-std (1)

1-1: Skipping review.

The provided code segment is a subproject commit hash, which does not require a code review.

v2/docs/src/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md (1)

1-12: LGTM!

The MessageContext struct definition is clear, concise, and aligns with the PR objectives of improving naming conventions and clarity. The struct encapsulates relevant data for cross-chain message handling, with descriptive field names and appropriate types.

The markdown documentation file provides a useful reference to the struct definition, making it easily accessible for developers working with the codebase.

v2/contracts/zevm/interfaces/UniversalContract.sol (3)

6-7: Deprecation notice looks good!

The deprecation notice for the zContext struct is clear and provides appropriate guidance to use MessageContext instead. This will help developers transition to the new struct and maintain consistency in the codebase.


26-30: The MessageContext struct is well-defined and enhances cross-chain context.

The MessageContext struct is a suitable replacement for the deprecated zContext struct. The field names are descriptive and the addition of the chainID field is a valuable improvement. By including the originating blockchain's identifier, the MessageContext struct provides enhanced context for cross-chain interactions, potentially improving the handling of messages across different blockchain environments.


33-33: The function signature change is appropriate and reflects the new MessageContext.

The modification of the function signature from onCrossChainCall to onCall aligns with the deprecation of zContext and the introduction of MessageContext. This change improves the clarity of the function signature and reflects the shift in handling cross-chain interactions.

It's worth noting that the new function name, onCall, is more generic compared to onCrossChainCall. This may suggest a broader scope for handling various types of calls beyond just cross-chain calls. Consider documenting the intended use cases for the onCall function to ensure clarity for developers working with the UniversalContract interface.

v2/test/utils/TestUniversalContract.sol (1)

31-32: LGTM! Verify the impact of the changes.

The renaming of onCrossChainCall to onCall and the change of the context parameter type from zContext to MessageContext align with the PR objectives and improve code clarity. The changes are consistent with the AI-generated summary and do not introduce any logical errors or impact the functionality of the contract.

Please ensure that the changes to the function signature are propagated to other parts of the codebase where this function is called or referenced. Run the following script to verify the impact:

v2/docs/src/SUMMARY.md (1)

32-32: LGTM! The addition of the MessageContext struct to the documentation summary is a valid change.

The AI-generated summary provides useful context about the MessageContext struct:

The diff introduces a new entry in the documentation summary for the MessageContext structure, which is located in the UniversalContract.sol file under the contracts/zevm/interfaces directory. This addition enhances the documentation by providing a reference to the MessageContext, which likely plays a role in the context of message handling within the Universal Contract framework.

Tools
Markdownlint

32-32: Expected: 4; Actual: 6
Unordered list indentation

(MD007, ul-indent)

v2/docs/src/index.md (1)

98-98: LGTM! The addition of MessageContext struct to the documentation is valuable.

The MessageContext struct is part of the UniversalContract interface, and documenting it will provide users with important information about the context in which messages are processed within the Universal Contract framework.

Tools
Markdownlint

98-98: Expected: 4; Actual: 6
Unordered list indentation

(MD007, ul-indent)

v2/docs/src/contracts/zevm/interfaces/IGatewayZEVM.sol/interface.IGatewayZEVM.md (3)

Line range hint 165-177: LGTM!

The renaming of zContext to MessageContext in the function signature enhances clarity and aligns with the PR objectives. The changes are consistent and the function logic remains intact.


Line range hint 191-203: Looks good!

The zContext type has been appropriately renamed to MessageContext in the function signature, which enhances clarity and maintains consistency with the PR objectives. The changes are well-implemented without affecting the function's behavior.


216-228: Approved!

The renaming of zContext to MessageContext in the function signature is a positive change that enhances clarity and maintains consistency with the PR objectives. The modifications are well-implemented without introducing any unintended side effects.

Tools
Markdownlint

224-224: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

v2/docs/src/contracts/zevm/GatewayZEVM.sol/contract.GatewayZEVM.md (3)

Line range hint 333-347: LGTM!

The parameter type change from zContext to MessageContext aligns with the PR objective and is a non-functional refactor.


Line range hint 361-375: LGTM!

The parameter type change from zContext to MessageContext aligns with the PR objective and is a non-functional refactor.


Line range hint 389-402: LGTM!

The parameter type change from zContext to MessageContext aligns with the PR objective and is a non-functional refactor.

v2/contracts/zevm/GatewayZEVM.sol (6)

9-9: LGTM!

The import statement update aligns with the PR objective of renaming zContext to MessageContext.


289-289: LGTM!

The function signature update aligns with the PR objective of renaming zContext to MessageContext.


301-301: LGTM!

The method call update aligns with the PR objective of renaming onCrossChainCall to onCall.


311-311: LGTM!

The function signature update aligns with the PR objective of renaming zContext to MessageContext.


326-326: LGTM!

The method call update aligns with the PR objective of renaming onCrossChainCall to onCall.


Line range hint 335-349: LGTM!

The function signature and method call updates align with the PR objectives of renaming zContext to MessageContext and onCrossChainCall to onCall.

v2/test/GatewayZEVM.t.sol (17)

492-493: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


502-503: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


512-513: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


522-523: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


533-534: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


562-563: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


572-573: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


582-583: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


595-596: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


609-610: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


619-620: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


629-630: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


688-689: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


698-699: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


712-713: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


722-723: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.


736-737: LGTM!

The changes to rename zContext to context and update its type to MessageContext are consistent with the alterations mentioned in the summary. The test functionality remains unchanged.

@@ -29,6 +29,7 @@
- [CoinType](contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md)
- [zContext](contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md)
- [zContract](contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md)
- [MessageContext](contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the indentation to match the surrounding entries.

The static analysis tool flagged an indentation issue:

32-32: Expected: 4; Actual: 6
Unordered list indentation

To fix the indentation, apply this diff:

-      - [MessageContext](contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
+    - [MessageContext](contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [MessageContext](contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
- [MessageContext](contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
Tools
Markdownlint

32-32: Expected: 4; Actual: 6
Unordered list indentation

(MD007, ul-indent)

@@ -95,6 +95,7 @@ $ cast --help
- [CoinType](protocol/contracts/zevm/interfaces/IZRC20.sol/enum.CoinType.md)
- [zContext](protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.zContext.md)
- [zContract](protocol/contracts/zevm/interfaces/UniversalContract.sol/interface.zContract.md)
- [MessageContext](protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the indentation of the unordered list item.

To maintain consistent formatting in the documentation, please adjust the indentation of the unordered list item to match the indentation level of the other items in the list.

Apply this diff to fix the indentation:

-      - [MessageContext](protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
+    - [MessageContext](protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [MessageContext](protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
- [MessageContext](protocol/contracts/zevm/interfaces/UniversalContract.sol/struct.MessageContext.md)
Tools
Markdownlint

98-98: Expected: 4; Actual: 6
Unordered list indentation

(MD007, ul-indent)

Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

Who prefer to have some discussion around backward compatibility before moving forward with this one

@skosito
Copy link
Contributor Author

skosito commented Sep 16, 2024

Who prefer to have some discussion around backward compatibility before moving forward with this one

yea that makes sense, but dont see a way to keep compatibility and rename, adding overloads seems like an overkill for this

can we just rename on protocol side as well, it should be simple change?

Copy link
Member

@fadeev fadeev left a comment

Choose a reason for hiding this comment

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

👍

@lumtis
Copy link
Member

lumtis commented Oct 14, 2024

Who prefer to have some discussion around backward compatibility before moving forward with this one

yea that makes sense, but dont see a way to keep compatibility and rename, adding overloads seems like an overkill for this

can we just rename on protocol side as well, it should be simple change?

Would the following be an overkill?

  • We check if the target contract implement the onCall interface
  • If not it tries with onCrossChainCall

If we consider ZETA is not supported for now, there are two entrypoint now where onCrossChainCall is used.

Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

As discussed, let's move forward with it

@skosito skosito merged commit f29829e into main Oct 15, 2024
11 checks passed
@skosito skosito deleted the rename-on-crosschain-call branch October 15, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename onCrossChainCall to onCall and zContext to messageContext
6 participants