-
Notifications
You must be signed in to change notification settings - Fork 270
fix: fix code snippets in interop tutorials #1575
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
Conversation
✅ Deploy Preview for docs-optimism ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
📝 Walkthrough## Walkthrough
This set of changes updates code snippet references within three tutorial documentation files related to cross-chain operations and token transfers. In the "bridge-crosschain-eth" tutorial, the referenced line ranges and hashes for TypeScript code snippets are adjusted to reflect updates in the source file, without modifying the tutorial text or code logic. The "message-passing" tutorial updates its TypeScript example to use a wallet-based interop API for fetching and checking the status of cross-domain messages, replacing a previous direct function call approach. In the "transfer-superchainERC20" tutorial, the embedded code snippet references are updated to point to new line ranges and hashes, indicating updates to the underlying example code, but with no changes to the tutorial’s textual content or logic.
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant User
participant WalletA
participant WalletB
User->>WalletA: Submit transaction (manual message relay)
WalletA->>WalletA: interop.getCrossDomainMessages(receipt.logs)
WalletA-->>User: Return cross-domain messages
User->>WalletB: Query message status
WalletB->>WalletB: interop.getCrossDomainMessageStatus(message)
WalletB-->>User: Return message status Possibly related PRs
Suggested reviewers
|
23a3a0d
to
6a9907f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pages/interop/tutorials/relay-messages-cast.mdx (1)
170-170
: Grammar Note: Consider Consistency in TerminologyStatic analysis flagged a potential improvement: verify if the term "admin RPC methods" should instead use the plural "admins" (for example, "admins RPC methods") for clarity and consistency with team conventions. Adjust if needed.
🧰 Tools
🪛 LanguageTool
[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...(ARE_CD_NN)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
pages/interop/tutorials/bridge-crosschain-eth.mdx
(2 hunks)pages/interop/tutorials/message-passing.mdx
(5 hunks)pages/interop/tutorials/relay-messages-cast.mdx
(1 hunks)pages/interop/tutorials/transfer-superchainERC20.mdx
(1 hunks)public/tutorials/GreetingSender.sol
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- public/tutorials/GreetingSender.sol
🚧 Files skipped from review as they are similar to previous changes (3)
- pages/interop/tutorials/transfer-superchainERC20.mdx
- pages/interop/tutorials/message-passing.mdx
- pages/interop/tutorials/bridge-crosschain-eth.mdx
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.mdx`: "ALWAYS review Markdown content THOROUGHLY with the following criteria: - First, check the frontmatter section at the top of the file: 1. For regular pages, ensure AL...
**/*.mdx
: "ALWAYS review Markdown content THOROUGHLY with the following criteria:
- First, check the frontmatter section at the top of the file:
- For regular pages, ensure ALL these fields are present and not empty:
--- title: [non-empty] lang: [non-empty] description: [non-empty] topic: [non-empty] personas: [non-empty array] categories: [non-empty array] content_type: [valid type] ---
- For landing pages (index.mdx or files with ), only these fields are required:
--- title: [non-empty] lang: [non-empty] description: [non-empty] topic: [non-empty] ---
- If any required fields are missing or empty, comment:
'This file appears to be missing required metadata. Please check keywords.config.yaml for valid options and add the required fields manually. You can validate your changes by running:pnpm validate-metadata ```'
- Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
- Avoid gender-specific language and use the imperative form.
- Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
- Ensure proper nouns are capitalized in sentences.
- Apply the Oxford comma.
- Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
- Use correct spelling and grammar at all times (IMPORTANT).
- For H1, H2, and H3 headers:
- Use sentence case, capitalizing only the first word.
- Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
- Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
- Flag any headers that seem to inconsistently apply these rules for manual review.
- When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
"
pages/interop/tutorials/relay-messages-cast.mdx
🪛 LanguageTool
pages/interop/tutorials/relay-messages-cast.mdx
[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...
(ARE_CD_NN)
🔇 Additional comments (2)
pages/interop/tutorials/relay-messages-cast.mdx (2)
1-21
: Frontmatter VerificationThe frontmatter includes all the required metadata fields (title, description, lang, content_type, topic, personas, categories, and is_imported_content), ensuring that the documentation page meets the project’s metadata standards.
170-170
: Typographical CorrectionThe extraneous trailing "and" has been successfully removed from the sentence listing the RPC methods. This correction improves grammatical accuracy and clarifies the instructions without affecting the technical content.
🧰 Tools
🪛 LanguageTool
[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...(ARE_CD_NN)
6a9907f
to
61afb52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pages/interop/tutorials/relay-messages-cast.mdx (1)
170-170
: Clarification on access list requirement.
The added explanation emphasizes that an access list is required with the relay message transaction and details the two available admin RPC methods (admin_getAccessListByMsgHash
andadmin_getAccessListForIdentifier
). For improved clarity, consider replacing the abbreviation "tx" with "transaction", and double-check that the phrasing "admin RPC methods" is intentional—as the static analysis hint suggests a potential grammar revision, though the current terminology accurately reflects the method names.🧰 Tools
🪛 LanguageTool
[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...(ARE_CD_NN)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
pages/interop/tutorials/bridge-crosschain-eth.mdx
(2 hunks)pages/interop/tutorials/message-passing.mdx
(5 hunks)pages/interop/tutorials/relay-messages-cast.mdx
(2 hunks)pages/interop/tutorials/transfer-superchainERC20.mdx
(1 hunks)public/tutorials/GreetingSender.sol
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- public/tutorials/GreetingSender.sol
- pages/interop/tutorials/bridge-crosschain-eth.mdx
🚧 Files skipped from review as they are similar to previous changes (2)
- pages/interop/tutorials/transfer-superchainERC20.mdx
- pages/interop/tutorials/message-passing.mdx
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.mdx`: "ALWAYS review Markdown content THOROUGHLY with the following criteria: - First, check the frontmatter section at the top of the file: 1. For regular pages, ensure AL...
**/*.mdx
: "ALWAYS review Markdown content THOROUGHLY with the following criteria:
- First, check the frontmatter section at the top of the file:
- For regular pages, ensure ALL these fields are present and not empty:
--- title: [non-empty] lang: [non-empty] description: [non-empty] topic: [non-empty] personas: [non-empty array] categories: [non-empty array] content_type: [valid type] ---
- For landing pages (index.mdx or files with ), only these fields are required:
--- title: [non-empty] lang: [non-empty] description: [non-empty] topic: [non-empty] ---
- If any required fields are missing or empty, comment:
'This file appears to be missing required metadata. Please check keywords.config.yaml for valid options and add the required fields manually. You can validate your changes by running:pnpm validate-metadata ```'
- Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
- Avoid gender-specific language and use the imperative form.
- Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
- Ensure proper nouns are capitalized in sentences.
- Apply the Oxford comma.
- Use proper title case for buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
- Use correct spelling and grammar at all times (IMPORTANT).
- For H1, H2, and H3 headers:
- Use sentence case, capitalizing only the first word.
- Preserve the capitalization of proper nouns, technical terms, and acronyms as defined in the 'nouns.txt' file located in the root directory of the project.
- Do not automatically lowercase words that appear in the 'nouns.txt' file, regardless of their position in the header.
- Flag any headers that seem to inconsistently apply these rules for manual review.
- When reviewing capitalization, always refer to the 'nouns.txt' file for the correct capitalization of proper nouns and technical terms specific to the project.
"
pages/interop/tutorials/relay-messages-cast.mdx
🪛 LanguageTool
pages/interop/tutorials/relay-messages-cast.mdx
[grammar] ~170-~170: Did you mean “admins”?
Context: ...ith the relay message tx. There are two admin RPC methods that can be used to constru...
(ARE_CD_NN)
🔇 Additional comments (2)
pages/interop/tutorials/relay-messages-cast.mdx (2)
1-21
: Frontmatter metadata and structure are correct.
The frontmatter includes all the required fields (title, description, lang, content_type, topic, personas, categories, and is_imported_content) as specified in the guidelines. Everything is populated with non-empty, valid values.
128-128
: Clarification on block hash placeholder usage.
This update clearly instructs users to replace0xREPLACE_WITH_CORRECT_BLOCKHASH
with the actualblockHash
obtained from the previous log output. This clarification enhances accuracy and reduces potential misinterpretations.
61afb52
to
8bd8906
Compare
LGTM @tremarkley |
This PR merged without the code snippet hashes being properly updated: #1569, this PR fixes the incorrect snippets.