Skip to content

Tutorial: Upgrade ERC20 to support interop #1525

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

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

qbzzt
Copy link
Contributor

@qbzzt qbzzt commented Mar 24, 2025

Description

Tutorial on how to use your existing ERC-20 in the new world of interop.

Tests

N/A

Additional context

N/A

Metadata

N/A

Copy link

netlify bot commented Mar 24, 2025

Deploy Preview for docs-optimism ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9bcaaeb
🔍 Latest deploy log https://app.netlify.com/sites/docs-optimism/deploys/67f07a99f35a550008a6c29b
😎 Deploy Preview https://deploy-preview-1525--docs-optimism.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@qbzzt qbzzt marked this pull request as ready for review April 2, 2025 01:17
@qbzzt qbzzt requested a review from a team as a code owner April 2, 2025 01:17
Copy link
Contributor

coderabbitai bot commented Apr 2, 2025

📝 Walkthrough

Walkthrough

This pull request introduces a new tutorial titled "Upgrading ERC-20 tokens for interop support," which is added to the interop section of the documentation. A new tutorial card has been created, linking to the tutorial's path. The meta JSON file is updated to include a new entry for the tutorial. Additionally, several new Solidity contracts are introduced: the InteropToken, which supports crosschain minting and burning, the LockboxSuperchainERC20, which manages locked token upgrades, and the LockboxDeployer, responsible for deploying lockbox tokens using the CREATE2 opcode. A shell script named setup-for-erc20-upgrade.sh is also included to automate the setup for deploying an upgradeable ERC-20 token using OpenZeppelin contracts. Lastly, new vocabulary entries have been added to the words.txt file.

Possibly related issues

  • user stories / features for interop ERC20  supersim#89: The changes in the main issue, which involve adding a tutorial for upgrading ERC-20 tokens to support interoperability, are directly related to the retrieved issue that discusses user stories and features for interop ERC20, specifically the upgrade path to SuperchainERC20. Both issues focus on the process of upgrading ERC20 tokens to enhance interoperability.

Possibly related PRs

  • Superchain Interop-Compatible Tokens #1419: The changes in the main PR, which focus on adding a tutorial for upgrading ERC-20 tokens to support interoperability, are related to the retrieved PR that introduces a guide for making tokens compatible with Superchain interoperability, as both involve the SuperchainERC20 standard and its implementation.
  • Tutorial that teaches how to write custom SuperchainERC20 token contracts #1390: The changes in the main PR, which focus on adding a tutorial for upgrading ERC-20 tokens, are related to the retrieved PR that introduces a tutorial for creating custom SuperchainERC20 tokens, as both involve modifications to the SuperchainERC20 framework and provide guidance on token interoperability.
  • Convert erc20 to serc20 tutorial #1403: The changes in the main PR are related to the modifications in the retrieved PR as both involve the addition of tutorials and enhancements to the documentation regarding ERC20 and SuperchainERC20 tokens, specifically focusing on interoperability.

🪧 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

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

🧹 Nitpick comments (20)
pages/stack/interop/tutorials.mdx (1)

34-35: Add missing “topic” field in the front matter.

Because this file displays , it is treated as a landing page. Landing pages require the topic field in the front matter. You can fix this by running:

pnpm metadata-batch-cli:dry "pages/stack/interop/tutorials.mdx"

Review the changes, then run without :dry to apply them.

words.txt (2)

189-189: "knowlege" is likely misspelled.

Consider changing to "knowledge" if that is the intended word.


322-322: Possible duplication of “Proxied” and “proxied.”

If both are not needed, remove the duplicate entry to keep the vocab file concise.

🧰 Tools
🪛 LanguageTool

[duplication] ~322-~322: Možný preklep: zopakovali ste slovo
Context: ...e productionized Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknode quicknode qu...

(WORD_REPEAT_RULE)

public/tutorials/InteropToken.sol (1)

19-25: Check for zero-address minting.

Consider disallowing _to = address(0) to prevent inadvertent or meaningless mints:

function crosschainMint(address _to, uint256 _amount) external {
+   require(_to != address(0), "Cannot mint to the zero address");
    require(msg.sender == PredeployAddresses.SUPERCHAIN_TOKEN_BRIDGE, "Unauthorized");
    _mint(_to, _amount);
    emit CrosschainMint(_to, _amount, msg.sender);
}
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (10)

40-46: Avoid first-person pronouns and adjust comma usage before "because".
Use imperative style or other neutral phrasing to maintain consistency, and consider removing the comma before “because” if it is essential to the meaning.

🧰 Tools
🪛 LanguageTool

[formatting] ~42-~42: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


100-120: Rephrase repetitive "We need to" expressions and add a comma after "In this case" for clarity.
Try more direct directives like “You must” or “Ensure that,” and insert a comma after “In this case” to improve readability.

🧰 Tools
🪛 LanguageTool

[style] ~107-~107: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e storage layout of the ERC-20 contract needs to be the same as the one of `SuperchainER...

(REP_NEED_TO_VB)


[formatting] ~109-~109: Consider inserting a comma after an introductory phrase for better readability.
Context: ... proxy contract was initially deployed. In this case we can see it in the upgrade script. W...

(IN_THAT_CASE_COMMA)


[style] ~112-~112: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e can see it in the upgrade script. We need to follow the same steps, from the same ad...

(REP_NEED_TO_VB)


280-285: Correct article usage in “The A chain.”
Replace “The A chain” with “Chain A” to avoid using a double determiner and maintain clarity in references to specific chains.

🧰 Tools
🪛 LanguageTool

[grammar] ~283-~283: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)


297-297: Review comma usage before "because."
If the clause is essential, omit the comma. Consider “for example because the organization...” to comply with style guidelines.

🧰 Tools
🪛 LanguageTool

[formatting] ~297-~297: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...vailable. This could happen, for example, because the organization that deployed the ERC-...

(COMMA_BEFORE_BECAUSE)


302-302: Review comma usage before "because."
Reword “Those tokens, because we control them...” to omit the comma if the clause is essential.

🧰 Tools
🪛 LanguageTool

[formatting] ~302-~302: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...equal number of new tokens. Those tokens, because we control them, are interoperable. Eve...

(COMMA_BEFORE_BECAUSE)


373-373: Review comma usage before "because."
Consider removing the comma in “...does not need an owner, because minting...” to match the recommended style.

🧰 Tools
🪛 LanguageTool

[formatting] ~373-~373: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...inERC20` contract does not need an owner, because minting and burning are handled by the ...

(COMMA_BEFORE_BECAUSE)


387-387: Use more concise phrasing instead of “a lot of.”
Replace “a lot of times” with a more precise expression, such as “frequently” or “often.”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~387-~387: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~387-~387: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)


424-424: Use “number of” for countable items.
Replace “an amount of tokens” with “a number of tokens” for better grammar in a countable context.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~424-~424: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...annotated-code/#_approve) to spend that amount of tokens from the original owner (`msg...

(AMOUNTOF_TO_NUMBEROF)


440-440: Remove the comma before "because" if the clause is essential.
Rephrase “This should never fail, because lockbox ERC-20 tokens...” to maintain clarity and style consistency.

🧰 Tools
🪛 LanguageTool

[formatting] ~440-~440: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ller. This should never fail, because lockbox ERC-20 tokens are supposed to a...

(COMMA_BEFORE_BECAUSE)


467-467: Include a comma after “To do this.”
In “To do this we first need...,” insert a comma after “this” for improved readability.

🧰 Tools
🪛 LanguageTool

[formatting] ~467-~467: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)

public/tutorials/setup-for-erc20-upgrade.sh (2)

5-5: Use a fallback for the directory change.
Consider adding “|| exit” after cd upgrade-erc20 to handle potential directory change failures.

- cd upgrade-erc20
+ cd upgrade-erc20 || exit
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 5-5: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


8-10: Consider removing or exporting unused variables.
USER_ADDRESS and URL_CHAIN_B are declared but not referenced further. If needed in external scripts, export them; otherwise, remove.

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 8-8: USER_ADDRESS appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 10-10: URL_CHAIN_B appears unused. Verify use (or export if used externally).

(SC2034)

public/tutorials/LockboxDeployer.s.sol (1)

8-86: Consider storing addresses for all deployed chains.
Currently, deployedAddress in the run() function is overwritten on each loop iteration. Use an array to keep track of multiple deployments in case you need them later.

public/tutorials/LockboxSuperchainERC20.sol (3)

1-2: Consider pinning or validating the compiler version.
Although ^0.8.25 is a valid pragma, you may consider pinning the compiler version or confirming that this version aligns with your project’s tested environment.


47-58: Consider using SafeERC20 and emit an event for locking.
Using OpenZeppelin’s SafeERC20 can simplify error handling by reverting on transfer failures, removing the need to check the boolean success. Emitting a LockAndMint event can provide better traceability for off-chain tools.

Example diff:

+import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

 contract LockboxSuperchainERC20 is SuperchainERC20 {
     ...
     function lockAndMint(uint256 amount_) external {
-        IERC20 originalToken = IERC20(_originalTokenAddress);
+        SafeERC20 originalToken = SafeERC20(_originalTokenAddress);

         require(block.chainid == _originalChainId, "Wrong chain");
-        bool success = originalToken.transferFrom(msg.sender, address(this), amount_);
-        require(success, "No tokens to lock, no mint either");
+        originalToken.safeTransferFrom(msg.sender, address(this), amount_);

+        // Emitting event for better traceability
+        emit TokensLocked(msg.sender, amount_);

         _mint(msg.sender, amount_);
     }

59-68: Consider emitting an event and using SafeERC20 for redemption.
Like the locking flow, an event (e.g., TokensRedeemed) and SafeERC20 can improve reliability and transparency, ensuring transfers either succeed or revert without manual return checks.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2009f49 and cdebe0f.

📒 Files selected for processing (8)
  • pages/stack/interop/tutorials.mdx (1 hunks)
  • pages/stack/interop/tutorials/_meta.json (1 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1 hunks)
  • public/tutorials/InteropToken.sol (1 hunks)
  • public/tutorials/LockboxDeployer.s.sol (1 hunks)
  • public/tutorials/LockboxSuperchainERC20.sol (1 hunks)
  • public/tutorials/setup-for-erc20-upgrade.sh (1 hunks)
  • words.txt (3 hunks)
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. If any required fields are missing or empty, comment:
      'This file appears to be missing required metadata. You can fix this by running:
    pnpm metadata-batch-cli:dry "path/to/this/file.mdx"
    Review the changes, then run without :dry to apply them.'
  • 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials.mdx
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx
🧠 Learnings (1)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1)
Learnt from: sbvegan
PR: ethereum-optimism/docs#1376
File: pages/stack/interop/tutorials/deploy-superchain-erc20.mdx:125-131
Timestamp: 2025-03-27T06:17:57.288Z
Learning: Use descriptive placeholders (e.g., 'YOUR_KEY_HERE') instead of example values when documenting sensitive information like private keys in documentation files to prevent users from accidentally using insecure values.
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx

[formatting] ~42-~42: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[style] ~107-~107: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e storage layout of the ERC-20 contract needs to be the same as the one of `SuperchainER...

(REP_NEED_TO_VB)


[formatting] ~109-~109: Consider inserting a comma after an introductory phrase for better readability.
Context: ... proxy contract was initially deployed. In this case we can see it in the upgrade script. W...

(IN_THAT_CASE_COMMA)


[style] ~112-~112: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e can see it in the upgrade script. We need to follow the same steps, from the same ad...

(REP_NEED_TO_VB)


[grammar] ~283-~283: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)


[formatting] ~297-~297: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...vailable. This could happen, for example, because the organization that deployed the ERC-...

(COMMA_BEFORE_BECAUSE)


[formatting] ~298-~298: Consider inserting a comma after an introductory phrase for better readability.
Context: ...0 contract does not wish to cooperate. For those cases there is an alternative solution, the l...

(IN_THAT_CASE_COMMA)


[formatting] ~302-~302: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...equal number of new tokens. Those tokens, because we control them, are interoperable. Eve...

(COMMA_BEFORE_BECAUSE)


[formatting] ~373-~373: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...inERC20` contract does not need an owner, because minting and burning are handled by the ...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~387-~387: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~387-~387: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)


[uncategorized] ~424-~424: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...annotated-code/#_approve) to spend that amount of tokens from the original owner (`msg...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~440-~440: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ller. This should never fail, because lockbox ERC-20 tokens are supposed to a...

(COMMA_BEFORE_BECAUSE)


[formatting] ~467-~467: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)

words.txt

[duplication] ~322-~322: Možný preklep: zopakovali ste slovo
Context: ...e productionized Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknode quicknode qu...

(WORD_REPEAT_RULE)

🪛 Gitleaks (8.21.2)
public/tutorials/setup-for-erc20-upgrade.sh

7-7: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 Shellcheck (0.10.0)
public/tutorials/setup-for-erc20-upgrade.sh

[warning] 5-5: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 8-8: USER_ADDRESS appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 10-10: URL_CHAIN_B appears unused. Verify use (or export if used externally).

(SC2034)

🔇 Additional comments (9)
pages/stack/interop/tutorials.mdx (1)

34-35: New card addition looks good.

pages/stack/interop/tutorials/_meta.json (1)

5-6: No issues found in the newly added tutorial entry.

words.txt (1)

376-376: No issues with “solady.”

pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1)

1-5: This file appears to be missing required metadata.
The frontmatter for regular tutorial pages must include the fields title, lang, description, topic, personas, categories, and content_type. You can fix this by running:

pnpm metadata-batch-cli:dry "path/to/this/file.mdx"

Review the changes, then run without :dry to apply them.

public/tutorials/LockboxDeployer.s.sol (1)

8-86: Overall code review: Good structure and clarity.
The deployment flow is clearly laid out, and error handling for duplicate addresses is robust. No further critical issues detected.

public/tutorials/LockboxSuperchainERC20.sol (4)

4-6: Confirm the import paths.
Please verify that ./SuperchainERC20.sol correctly references the intended parent class file and that @openzeppelin/contracts/interfaces/IERC20.sol is the desired interface source.


7-13: Verify the parent constructor requirements.
Ensure that SuperchainERC20 has no mandatory constructor arguments that need to be initialized, and confirm that extending SuperchainERC20 without an explicit base constructor call is correct.


27-38: Field and accessor overrides look correct.
No issues found with overriding and returning _name, _symbol, and _decimals.


39-46: Accessors for original token info are well-defined.
Your getters for _originalTokenAddress and _originalChainId are straightforward and properly scoped.

contract InteropToken is Initializable, ERC20Upgradeable, OwnableUpgradeable, IERC7802 {
function initialize(string memory name, string memory symbol, uint256 initialSupply) public initializer {
__ERC20_init(name, symbol);
__Ownable_init(msg.sender);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Potential compile-time error with __Ownable_init(msg.sender).

By default, OpenZeppelin’s __Ownable_init() does not accept any parameters, causing a mismatch. If there is no custom override, consider applying this fix:

-__Ownable_init(msg.sender);
+__Ownable_init();
📝 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
__Ownable_init(msg.sender);
__Ownable_init();

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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

🧹 Nitpick comments (5)
public/tutorials/LockboxSuperchainERC20.sol (5)

49-59: Add events for important state changes.

The contract doesn't emit any events when tokens are locked and minted. Events are crucial for tracking contract activity off-chain and for UIs to react to contract state changes.

Consider adding events like:

+ event TokensLocked(address indexed user, uint256 amount);
+ event TokensRedeemed(address indexed user, uint256 amount);

function lockAndMint(uint256 amount_) external {
    // ... existing code ...
    
    require(success, "No tokens to lock, no mint either");
    _mint(msg.sender, amount_);
+   emit TokensLocked(msg.sender, amount_);
}

function redeemAndBurn(uint256 amount_) external {
    // ... existing code ...
    
    bool success = originalToken.transfer(msg.sender, amount_);
    require(success, "Transfer failed, this should not happen");
+   emit TokensRedeemed(msg.sender, amount_);
}

14-27: Validate token decimals match.

The constructor accepts a decimals_ parameter but doesn't verify if it matches the decimals of the original token. A mismatch could lead to unexpected behavior when locking and minting tokens.

Consider adding validation:

constructor(
    string memory name_, 
    string memory symbol_, 
    uint8 decimals_,
    address originalTokenAddress_,
    uint256 originalChainId_) {
    require(originalTokenAddress_ != address(0), "Invalid token address");
    require(originalChainId_ != 0, "Invalid chain ID");
+   
+   // Validate decimals match the original token
+   IERC20 originalToken = IERC20(originalTokenAddress_);
+   try IERC20Metadata(originalTokenAddress_).decimals() returns (uint8 originalDecimals) {
+       require(decimals_ == originalDecimals, "Decimals mismatch");
+   } catch {
+       // If the original token doesn't implement decimals(), we can't validate
+   }
    
    _name = name_;
    _symbol = symbol_;
    _decimals = decimals_;
    _originalTokenAddress = originalTokenAddress_;
    _originalChainId = originalChainId_;
}

Note: This requires importing the IERC20Metadata interface:

import {IERC20Metadata} from "@openzeppelin/contracts/interfaces/IERC20Metadata.sol";

56-56: Fix typo in comment.

There's a typographical error in the comment: "necessariy" should be "necessary".

-   // Not necessariy if the ERC-20 contract reverts rather than reverting.
+   // Not necessary if the ERC-20 contract reverts rather than returning false.

1-70: Add NatSpec documentation for better code clarity.

The contract lacks comprehensive documentation which would make it more accessible to developers. Consider adding NatSpec comments for the contract and its functions.

Example for the contract:

+/**
+ * @title LockboxSuperchainERC20
+ * @dev A contract that locks original ERC20 tokens and mints equivalent Superchain ERC20 tokens.
+ * This allows existing ERC20 tokens to be upgraded for interoperability with Superchain.
+ */
contract LockboxSuperchainERC20 is SuperchainERC20 {

Example for a function:

+/**
+ * @notice Locks original tokens and mints equivalent Superchain tokens
+ * @param amount_ The amount of tokens to lock and mint
+ * @dev This function can only be called on the original chain.
+ * The caller must have approved this contract to transfer the original tokens.
+ */
function lockAndMint(uint256 amount_) external {

49-59: Handle potential accidental token transfers.

If users mistakenly transfer tokens directly to this contract (not using lockAndMint), those tokens will be permanently locked with no way to recover them.

Consider adding a function to rescue tokens sent directly:

+/**
+ * @notice Allows recovery of tokens mistakenly sent to the contract
+ * @param token The address of the token to recover
+ * @param amount The amount of tokens to recover
+ * @param recipient The recipient of the recovered tokens
+ * @dev This function can only be called by the contract owner.
+ * It should not be used for the original token managed by this contract.
+ */
+function rescueTokens(
+    address token,
+    uint256 amount,
+    address recipient
+) external onlyOwner {
+    // Prevent rescuing the tokens that are meant to be locked
+    require(token != _originalTokenAddress || block.chainid != _originalChainId, 
+            "Cannot rescue locked tokens");
+    
+    IERC20(token).transfer(recipient, amount);
+}

Note: This requires implementing access control (e.g., OpenZeppelin's Ownable) for the contract.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cdebe0f and 11e0b32.

📒 Files selected for processing (1)
  • public/tutorials/LockboxSuperchainERC20.sol (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
🔇 Additional comments (1)
public/tutorials/LockboxSuperchainERC20.sol (1)

61-69: Implement checks-effects-interactions pattern in redeemAndBurn.

Similar to lockAndMint, the redeemAndBurn function should follow the checks-effects-interactions pattern to protect against potential reentrancy, even though the burn happens before the transfer.

The current implementation already follows this pattern since it performs the state change (_burn) before the external interaction (transfer). This is the correct ordering.

Comment on lines +49 to +59
function lockAndMint(uint256 amount_) external {
IERC20 originalToken = IERC20(_originalTokenAddress);

require(block.chainid == _originalChainId, "Wrong chain");
bool success = originalToken.transferFrom(msg.sender, address(this), amount_);

// Not necessariy if the ERC-20 contract reverts rather than reverting.
// However, the standard allows the ERC-20 contract to return false instead.
require(success, "No tokens to lock, no mint either");
_mint(msg.sender, amount_);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider implementing reentrancy protection for external calls.

The lockAndMint function makes an external call (transferFrom) before updating the contract state (_mint). This ordering is susceptible to reentrancy attacks if the original token contract is malicious or compromised.

Apply this diff to implement checks-effects-interactions pattern:

function lockAndMint(uint256 amount_) external {
    IERC20 originalToken = IERC20(_originalTokenAddress);

    require(block.chainid == _originalChainId, "Wrong chain");
-   bool success = originalToken.transferFrom(msg.sender, address(this), amount_);
-
-   // Not necessariy if the ERC-20 contract reverts rather than reverting.
-   // However, the standard allows the ERC-20 contract to return false instead.
-   require(success, "No tokens to lock, no mint either");
-   _mint(msg.sender, amount_);
+   // Mint first (effects)
+   _mint(msg.sender, amount_);
+   
+   // Then transfer tokens (interactions)
+   bool success = originalToken.transferFrom(msg.sender, address(this), amount_);
+
+   // Not necessary if the ERC-20 contract reverts rather than returning false.
+   // However, the standard allows the ERC-20 contract to return false instead.
+   require(success, "Transfer failed, reverting mint");
}
📝 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
function lockAndMint(uint256 amount_) external {
IERC20 originalToken = IERC20(_originalTokenAddress);
require(block.chainid == _originalChainId, "Wrong chain");
bool success = originalToken.transferFrom(msg.sender, address(this), amount_);
// Not necessariy if the ERC-20 contract reverts rather than reverting.
// However, the standard allows the ERC-20 contract to return false instead.
require(success, "No tokens to lock, no mint either");
_mint(msg.sender, amount_);
}
function lockAndMint(uint256 amount_) external {
IERC20 originalToken = IERC20(_originalTokenAddress);
require(block.chainid == _originalChainId, "Wrong chain");
// Mint first (effects)
_mint(msg.sender, amount_);
// Then transfer tokens (interactions)
bool success = originalToken.transferFrom(msg.sender, address(this), amount_);
// Not necessary if the ERC-20 contract reverts rather than returning false.
// However, the standard allows the ERC-20 contract to return false instead.
require(success, "Transfer failed, reverting mint");
}


## Overview

This guide explains how to upgrade an ERC20 to a [`SuperchainERC20`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainERC20.sol) that can teleport across the Superchain interop cluster quickly and safely using the [`SuperchainTokenBridge`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainTokenBridge.sol) contract. For more information on how it works, [see the explainer](/stack/interop/superchain-erc20).
Copy link
Contributor

Choose a reason for hiding this comment

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

nit should we do ERC20 or ERC-20 i see it both in this doc


*/}

### What you'll do
Copy link
Contributor

Choose a reason for hiding this comment

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

Thoughts on starting with for overview steps:

1.) Categorize your token

Determine which of the following categories best describes your token's current state.

Category A: The token already exists and is upgradable via a proxy pattern.

Category B: The token already exists and is immutable.

Category C: The token is new and is not deployed anywhere.

2.) Prepare to deploy

Category A: Upgrading an existing ERC-20 token that uses the proxy pattern

Category B: Upgrading an existing ERC-20 token that is immutable

Category C: Goes to existing deploy SuperchainERC20 tutorial

Then we get into the relevant sections?

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe easier is just show a flow chart

[Has the token been deployed]

No -> Deploy a SuperchainERC20

Yes -> Is it upgradable? No -> Lockbox Yes -> Proxy upgrade

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

🧹 Nitpick comments (15)
words.txt (4)

189-189: Possible Typo in "knowlege"

The term "knowlege" may be a misspelling of "knowledge." If this was intentional for a specific context, please confirm; otherwise, consider correcting it.


193-193: Verify the Term "Lockboxe"

The entry "Lockboxe" is added here and appears linked to the Lockbox contract introduced in the PR. Please confirm that this spelling is intentional and matches related documentation and smart contract names.


322-323: Evaluate Duplicate "proxied" Entries

The list includes both "Proxied" (line 322) and "proxied" (line 323). If the capitalization difference is intended to capture case-sensitive variations, it’s fine. Otherwise, consider removing the duplicate to avoid redundancy as highlighted by the static analysis tool.

🧰 Tools
🪛 LanguageTool

[duplication] ~323-~323: Možný preklep: zopakovali ste slovo
Context: ...e productionized Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknode quicknode qu...

(WORD_REPEAT_RULE)


377-377: Confirm the New Entry "solady"

The new term "solady" is added, which may be associated with new smart contract functionality. Please verify that this is the correct and intended term to be included in the vocabulary.

pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (11)

1-5: Frontmatter metadata completeness:
The frontmatter currently includes only the title, language, and description. For regular pages, the guidelines require additional fields such as topic, personas, categories, and content_type. Please add these fields to ensure proper metadata and consistency across documentation.


21-31: Details "About this tutorial" block:
The details section is useful; however, there is a minor typo in “Prerequisite knowlege” – consider correcting it to “Prerequisite knowledge.”


40-46: Commented-out developer note:
There is a JSX-style commented block with developer notes. Please decide whether this note should remain in the published documentation. If it’s only meant for internal context, consider removing it or relocating it to a developer-only section to avoid confusing end users.

🧰 Tools
🪛 LanguageTool

[formatting] ~42-~42: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


48-55: “What you’ll do” section consistency:
The bullet points clearly outline the tasks. Note, however, that the text uses “ERC-20” (with a hyphen) while the title uses “ERC20.” For consistency, choose one style and apply it uniformly throughout the document.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~48-~48: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do * Upgrade an existing ERC-20 that us...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


102-115: ERC-20 proxy upgrade introduction:
The explanation of requirements for upgrading an ERC-20 token is clear. Consider rephrasing “the storage layout of the ERC-20 contract needs to be the same as the one of SuperchainERC20” to “the storage layout of the ERC-20 contract must match that of SuperchainERC20” for improved readability.

🧰 Tools
🪛 LanguageTool

[style] ~109-~109: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e storage layout of the ERC-20 contract needs to be the same as the one of `SuperchainER...

(REP_NEED_TO_VB)


[formatting] ~111-~111: Consider inserting a comma after an introductory phrase for better readability.
Context: ... proxy contract was initially deployed. In this case we can see it in the upgrade script. W...

(IN_THAT_CASE_COMMA)


[style] ~114-~114: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e can see it in the upgrade script. We need to follow the same steps, from the same ad...

(REP_NEED_TO_VB)


116-128: Foundry project setup instructions:
The steps for creating a Foundry project and installing the required OpenZeppelin packages are practical and clear. A minor note: review verb tenses and ensure consistency (e.g., “We create” might be changed to “Create” for imperative consistency).

🧰 Tools
🪛 LanguageTool

[uncategorized] ~120-~120: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...s> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~120-~120: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


186-211: InteropToken contract instructions:
The detailed instructions to create the InteropToken.sol file, along with the file reference details, are very thorough. It is advisable to ensure that referenced file paths and hash values remain accurate with future updates.

🧰 Tools
🪛 Gitleaks (8.21.2)

204-204: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


228-248: Sanity check for proxy upgrade:
The sanity check steps, which include reviewing balances and transferring tokens, are comprehensive. For clarity, it might help to include a brief note on the expected outcomes (e.g., “The A chain should have 0.9 tokens and the B chain 0.1 tokens”) for readers new to the process.


250-260: Lockboxes introduction section:
The explanation of when the proxy upgrade method is not applicable and the introduction of the lockbox solution is clear. A minor grammatical improvement: change “the lockbox is smart contract” to “the lockbox is a smart contract.”


276-309: Deployment utilities update instructions:
The instructions for downloading the SuperchainERC20 starter kit and updating the deployment utilities (including the replacement of package.json) are clear. Please verify that the provided package.json aligns with current project standards and that all paths are correct.

🧰 Tools
🪛 LanguageTool

[grammar] ~286-~286: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)


[formatting] ~300-~300: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...vailable. This could happen, for example, because the organization that deployed the ERC-...

(COMMA_BEFORE_BECAUSE)


[formatting] ~301-~301: Consider inserting a comma after an introductory phrase for better readability.
Context: ...0 contract does not wish to cooperate. For those cases there is an alternative solution, the l...

(IN_THAT_CASE_COMMA)


[uncategorized] ~303-~303: You might be missing the article “a” here.
Context: ...e solution, the lockbox. The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~303-~303: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


393-444: Sanity check for lockbox contracts:
The multi-step sanity check for the lockbox, which involves approving tokens, locking/minting, transferring tokens, and redeeming them, is thorough. For added clarity, consider including explicit expected outcomes at each step for users who are less familiar with the process.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 11e0b32 and ca937f7.

📒 Files selected for processing (4)
  • pages/stack/interop/tutorials/_meta.json (1 hunks)
  • pages/stack/interop/tutorials/custom-superchain-erc20.mdx (2 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1 hunks)
  • words.txt (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • pages/stack/interop/tutorials/custom-superchain-erc20.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • pages/stack/interop/tutorials/_meta.json
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. If any required fields are missing or empty, comment:
      'This file appears to be missing required metadata. You can fix this by running:
    pnpm metadata-batch-cli:dry "path/to/this/file.mdx"
    Review the changes, then run without :dry to apply them.'
  • 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx

[formatting] ~42-~42: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~48-~48: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do * Upgrade an existing ERC-20 that us...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~109-~109: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e storage layout of the ERC-20 contract needs to be the same as the one of `SuperchainER...

(REP_NEED_TO_VB)


[formatting] ~111-~111: Consider inserting a comma after an introductory phrase for better readability.
Context: ... proxy contract was initially deployed. In this case we can see it in the upgrade script. W...

(IN_THAT_CASE_COMMA)


[style] ~114-~114: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e can see it in the upgrade script. We need to follow the same steps, from the same ad...

(REP_NEED_TO_VB)


[uncategorized] ~120-~120: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...s> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~120-~120: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[grammar] ~286-~286: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)


[formatting] ~300-~300: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...vailable. This could happen, for example, because the organization that deployed the ERC-...

(COMMA_BEFORE_BECAUSE)


[formatting] ~301-~301: Consider inserting a comma after an introductory phrase for better readability.
Context: ...0 contract does not wish to cooperate. For those cases there is an alternative solution, the l...

(IN_THAT_CASE_COMMA)


[uncategorized] ~303-~303: You might be missing the article “a” here.
Context: ...e solution, the lockbox. The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~303-~303: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~468-~468: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)

words.txt

[duplication] ~323-~323: Možný preklep: zopakovali ste slovo
Context: ...e productionized Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknode quicknode qu...

(WORD_REPEAT_RULE)

🪛 Gitleaks (8.21.2)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx

94-94: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


150-150: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


204-204: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


502-502: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🔇 Additional comments (14)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (14)

7-9: Import statements review:
The imports from nextra/components are correctly declared and consistent with the project’s component library usage.


10-13: Callout component for deployment readiness:
This callout clearly informs readers that the SuperchainERC20 standard is production-ready while warning about the active development of the OP Stack interop upgrade. The messaging is clear and instructive.


15-15: Page title validation:
The header “Upgrading ERC20 to SuperchainERC20” is clear. Ensure that the naming convention for “ERC20” remains consistent throughout the document (see later comments regarding “ERC-20” versus “ERC20”).


17-20: Overview section clarity:
The overview provides a concise explanation of what the tutorial covers, including helpful links to related resources. The content is informative and well structured.


33-38: Warning callout clarity:
The warning callout explicitly states that the code provided is sample code and has not been fully audited. This is important information for readers. The tone and content are appropriate.


129-168: Deployment script and nonce reconciliation guidance:
The instructions on creating and running the deployment script, as well as handling nonce differences between chains, are comprehensive and clear. It may be beneficial to verify that the log parsing (using awk) and subsequent instructions are accurate as the environment evolves.

🧰 Tools
🪛 Gitleaks (8.21.2)

150-150: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


170-176: Nonce discrepancy callout:
The callout regarding nonce differences between chains is well written and offers practical advice. The alternative solutions provided are also useful.


177-185: Deploy ERC-7802 contracts instructions:
The section explaining the requirements for ERC-7802 and ERC-165 support is clear. The note about storage layout consistency is particularly useful.


212-220: Deployment command for InteropToken contracts:
The shell commands for deploying the InteropToken contract on both chains are clear. Verify that the awk pattern used to extract the deployment address reliably captures the intended output in various environments.


221-226: Proxy update instructions:
The commands to notify the beacon contracts about the new implementation are correctly specified. These instructions are succinct and clear.


261-274: Lockboxes environment variables setup:
The Steps block for setting additional environment variables for the lockbox deployment is well written and easy to follow.


310-341: LockboxDeployer.s.sol instructions:
The steps to create the LockboxDeployer.s.sol file, including the detailed explanation and the developer note regarding the salt function, are comprehensive. The warning to remove the timestamp-based salt from production is especially important.


342-392: Creation and deployment of LockboxSuperchainERC20:
The instructions for creating the new LockboxSuperchainERC20 contract are very detailed and cover both the file creation and the subsequent explanation. Ensure that any referenced file paths, hash values, or code excerpts remain up to date as the contract evolves.


446-451: Next steps section:
The final “Next steps” section provides actionable guidance for further learning and deployment. Ensure that all linked resources (e.g., the SuperchainERC20 tutorial and the revolutionary app guide) are up to date.

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

🧹 Nitpick comments (9)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (9)

1-6: Missing Required Frontmatter Metadata

The frontmatter is missing several required fields (e.g. topic, personas, categories, and content_type) needed by our documentation standards. This can be fixed by adding these fields. For example, you might update the metadata as follows:

 ---
 title: Upgrading ERC20 to SuperchainERC20
 lang: en-US
 description: Tutorial on how to take an existing ERC20 and upgrade it to SuperchainERC20.
+topic: Interoperability
+personas:
+  - Developer
+categories:
+  - Tutorial
+content_type: guide
 ---

15-31: Ensure Consistent Token Naming

The document uses both “ERC20” and “ERC-20” when referring to tokens. For clarity and consistency, please standardize the terminology (for example, always using “ERC-20”) throughout the tutorial.


27-28: Fix Typo in Header

The header “Prerequisite knowlege” contains a typo. Change “knowlege” to “knowledge” for clarity.


40-46: Remove or Refine Internal Developer Comment

There is an internal comment block using informal language (e.g. “IMHO”) that might be distracting in published documentation. Consider removing or refining it before release.

🧰 Tools
🪛 LanguageTool

[formatting] ~42-~42: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


118-120: Adopt an Imperative Tone for Instructions

Instead of “We create a Foundry project and import …”, use the imperative form (e.g. “Create a Foundry project and import …”) to align with our documentation style.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~120-~120: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...s> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~120-~120: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


110-111: Improve Readability with a Comma

In the sentence “In this case we can see it in the upgrade script,” consider inserting a comma after the introductory phrase. For example: “In this case, we can see it in the upgrade script.”

🧰 Tools
🪛 LanguageTool

[formatting] ~111-~111: Consider inserting a comma after an introductory phrase for better readability.
Context: ... proxy contract was initially deployed. In this case we can see it in the upgrade script. W...

(IN_THAT_CASE_COMMA)


302-303: Refine Lockbox Description

The sentence currently reads:
The lockbox is smart contract that accepts deposits of the original ERC-20 and issues an equivalent amount of tokens that are Superchain interop compatible.
Please modify it to improve grammar and clarity. For example:
The lockbox is a smart contract that accepts deposits of the original ERC-20 and issues an equivalent number of tokens that are Superchain interop compatible.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~303-~303: You might be missing the article “a” here.
Context: ...e solution, the lockbox. The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~303-~303: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


289-291: Clarify Chain Naming in Sanity Check

The sanity check instructs: “The A chain should have 0.9 tokens, and the B chain should have 0.1 tokens.” Consider revising this to “Chain A should have 0.9 tokens, and Chain B should have 0.1 tokens” for brevity and consistency.


386-394: Review Salt Function Modification

Within the deployment details, the salt function has been modified to include a timestamp for development convenience. Ensure that this timestamp-based salt modification is removed prior to production deployment to guarantee deterministic contract addresses.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~388-~388: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~388-~388: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca937f7 and 3685944.

📒 Files selected for processing (1)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1 hunks)
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. If any required fields are missing or empty, comment:
      'This file appears to be missing required metadata. You can fix this by running:
    pnpm metadata-batch-cli:dry "path/to/this/file.mdx"
    Review the changes, then run without :dry to apply them.'
  • 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx

[formatting] ~42-~42: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~48-~48: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do * Upgrade an existing ERC-20 that us...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~109-~109: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e storage layout of the ERC-20 contract needs to be the same as the one of `SuperchainER...

(REP_NEED_TO_VB)


[formatting] ~111-~111: Consider inserting a comma after an introductory phrase for better readability.
Context: ... proxy contract was initially deployed. In this case we can see it in the upgrade script. W...

(IN_THAT_CASE_COMMA)


[style] ~114-~114: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...e can see it in the upgrade script. We need to follow the same steps, from the same ad...

(REP_NEED_TO_VB)


[uncategorized] ~120-~120: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...s> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~120-~120: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[grammar] ~286-~286: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)


[formatting] ~300-~300: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...vailable. This could happen, for example, because the organization that deployed the ERC-...

(COMMA_BEFORE_BECAUSE)


[formatting] ~301-~301: Consider inserting a comma after an introductory phrase for better readability.
Context: ...0 contract does not wish to cooperate. For those cases there is an alternative solution, the l...

(IN_THAT_CASE_COMMA)


[uncategorized] ~303-~303: You might be missing the article “a” here.
Context: ...e solution, the lockbox. The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~303-~303: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~374-~374: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...inERC20` contract does not need an owner, because minting and burning are handled by the ...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~388-~388: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~388-~388: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)


[uncategorized] ~425-~425: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...annotated-code/#_approve) to spend that amount of tokens from the original owner (`msg...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~441-~441: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ller. This should never fail, because lockbox ERC-20 tokens are supposed to a...

(COMMA_BEFORE_BECAUSE)


[formatting] ~468-~468: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)

🪛 Gitleaks (8.21.2)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx

94-94: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


150-150: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


204-204: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


502-502: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism

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

🧹 Nitpick comments (4)
words.txt (4)

188-188: Review: Verify the spelling of "knowlege".
The entry "knowlege" appears to be a potential misspelling of "knowledge." Please confirm if this spelling is intentional for domain-specific purposes or if it should be corrected.


192-192: Review: Confirm the term "Lockboxe".
"Lockboxe" may be a domain-specific term; however, if the intended word is "Lockbox," please update it to ensure consistency with related documentation (e.g., the LockboxSuperchainERC20 contract).


321-321: Review: Evaluate duplicate entry "proxied".
The lowercase "proxied" on line 321 is added alongside an uppercase "Proxied" on line 320. If both case forms are required for proper vocabulary matching, consider adding a comment or note to clarify the intentional duplication.

🧰 Tools
🪛 LanguageTool

[duplication] ~321-~321: Možný preklep: zopakovali ste slovo
Context: ...e productionized Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknode quicknode qu...

(WORD_REPEAT_RULE)


376-376: Review: Verify the term "solady".
The term "solady" is introduced on line 376. Please confirm whether this is the correct term (possibly a domain-specific term) or if it should be "solidity" or another related term.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3685944 and 63f4021.

📒 Files selected for processing (3)
  • pages/stack/interop/tutorials.mdx (1 hunks)
  • pages/stack/interop/tutorials/custom-superchain-erc20.mdx (2 hunks)
  • words.txt (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • pages/stack/interop/tutorials.mdx
  • pages/stack/interop/tutorials/custom-superchain-erc20.mdx
🧰 Additional context used
🪛 LanguageTool
words.txt

[duplication] ~321-~321: Možný preklep: zopakovali ste slovo
Context: ...e productionized Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknode quicknode qu...

(WORD_REPEAT_RULE)

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

♻️ Duplicate comments (1)
public/tutorials/setup-for-erc20-upgrade.sh (1)

10-10: ⚠️ Potential issue

Security Issue: Hardcoded Private Key Detected
A private key is directly hardcoded in the script, which is a significant security risk. Consider removing the hardcoded value and instead retrieve it from an environment variable or secure vault.

🧹 Nitpick comments (12)
pages/stack/interop/tutorials/deploy-superchain-erc20.mdx (1)

48-52: Callout clarity adjustment:
The new callout provides a useful link for users needing migration guidance. For improved consistency and a more formal tone, consider rephrasing to, for example, “For upgrading an existing ERC20 token, refer to [this tutorial].”

words.txt (1)

317-321: Duplicate entry detected:
There appear to be duplicate or conflicting entries for “proxied” (and similar variants “Proxied” vs. “Proxyd”). Please remove or consolidate these duplicates to maintain consistency in the vocabulary list.

🧰 Tools
🪛 LanguageTool

[duplication] ~317-~317: Možný preklep: zopakovali ste slovo
Context: ...mit productionize productionized Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknod...

(WORD_REPEAT_RULE)


[duplication] ~319-~319: Možný preklep: zopakovali ste slovo
Context: ...e productionized Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknode quicknode qu...

(WORD_REPEAT_RULE)


[duplication] ~321-~321: Možný preklep: zopakovali ste slovo
Context: ...ed Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknode quicknode quickstarts ...

(WORD_REPEAT_RULE)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (2)

1-5: Missing metadata fields:
The frontmatter is currently missing several required fields (e.g., topic, personas, categories, content_type). Please update the metadata to comply with the documentation guidelines.


14-20: Consistent token naming:
Ensure that the naming of the token standard is consistent throughout the document (e.g., decide whether to use “ERC20” or “ERC-20” uniformly).

pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (2)

1-5: Missing metadata fields:
The frontmatter is missing required fields such as topic, personas, categories, and content_type. Please add these fields to meet the documentation standards.


28-34: Tone refinement in comments:
In the commented-out block, informal abbreviations (e.g., “IMHO”) are used. Consider revising these to maintain a formal tone in the documentation.

🧰 Tools
🪛 LanguageTool

[formatting] ~30-~30: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (2)

1-5: Enhance metadata completeness:
The frontmatter is missing required fields (topic, personas, categories, content_type). Please update the metadata per the documentation guidelines.


16-19: Grammar suggestion:
At line 18, the sentence “The lockbox is smart contract that accepts deposits...” would be clearer as “The lockbox is a smart contract that accepts deposits…”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~18-~18: You might be missing the article “a” here.
Context: ...ss interop ## Overview The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~18-~18: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)

public/tutorials/setup-for-erc20-upgrade.sh (4)

11-12: Unused Variable: URL_CHAIN_B
The variable URL_CHAIN_B is set for both local and Devnet environments but is not used later in the script. If this variable is intended for future features, adding an explanatory comment would help; otherwise, it might be best to remove it to reduce confusion.

Also applies to: 16-17


20-20: Unused Variable: USER_ADDRESS
The script retrieves the user address using the cast command and assigns it to USER_ADDRESS, but this variable is never used further. Consider removing it if it isn’t needed.

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 20-20: USER_ADDRESS appears unused. Verify use (or export if used externally).

(SC2034)


59-60: Clarify Conditional Logic in Token Initialization
For better readability, add extra parentheses around the condition in the abi.encodeCall to clearly delineate the ternary operation. For example:

-             abi.encodeCall(MyToken.initialize, ("Test", "TST",
- 		(block.chainid == 901) || (block.chainid == 420120000) ? 10**18 : 0))
+             abi.encodeCall(MyToken.initialize, ("Test", "TST",
+ 		((block.chainid == 901) || (block.chainid == 420120000)) ? 10**18 : 0))

71-72: Enhance Robustness When Parsing Deployment Output
Currently, awk is used to extract addresses from the deployment output. This method may break if the logging format changes. Consider using a more robust parsing method or adding validations to ensure the expected patterns are matched.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 63f4021 and 73f1f9f.

📒 Files selected for processing (7)
  • pages/stack/interop/tutorials/deploy-superchain-erc20.mdx (1 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/_meta.json (1 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (1 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (1 hunks)
  • public/tutorials/setup-for-erc20-upgrade.sh (1 hunks)
  • words.txt (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/_meta.json
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials/deploy-superchain-erc20.mdx
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx
🧠 Learnings (3)
pages/stack/interop/tutorials/deploy-superchain-erc20.mdx (1)
Learnt from: sbvegan
PR: ethereum-optimism/docs#1376
File: pages/stack/interop/tutorials/deploy-superchain-erc20.mdx:125-131
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Use descriptive placeholders (e.g., 'YOUR_KEY_HERE') instead of example values when documenting sensitive information like private keys in documentation files to prevent users from accidentally using insecure values.
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (1)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:500-503
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Private keys in the "Upgrading ERC20 to SuperchainERC20" tutorial document are test/demo keys intentionally included for educational purposes and do not represent security concerns.
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (2)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:500-503
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Private keys in the "Upgrading ERC20 to SuperchainERC20" tutorial document are test/demo keys intentionally included for educational purposes and do not represent security concerns.
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:93-99
Timestamp: 2025-04-03T17:34:05.701Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" is a well-known test private key used in Hardhat/Foundry development environments and does not need to be flagged as a security concern in documentation or tutorials.
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx

[uncategorized] ~18-~18: You might be missing the article “a” here.
Context: ...ss interop ## Overview The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~18-~18: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~42-~42: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~48-~48: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do Create a lockbox SuperchainERC20 con...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~79-~79: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[formatting] ~293-~293: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

[formatting] ~41-~41: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~47-~47: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do * Upgrade an existing ERC-20 that us...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~78-~78: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[uncategorized] ~134-~134: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...` ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~134-~134: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[grammar] ~288-~288: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx

[formatting] ~30-~30: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)

words.txt

[duplication] ~319-~319: Možný preklep: zopakovali ste slovo
Context: ...e productionized Protip Proxied proxied Proxyd proxyd Pyth Pyth's QRNG Quicknode quicknode qu...

(WORD_REPEAT_RULE)

🪛 Gitleaks (8.21.2)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx

103-103: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


329-329: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

102-102: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


164-164: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


208-208: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 Shellcheck (0.10.0)
public/tutorials/setup-for-erc20-upgrade.sh

[warning] 5-5: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 17-17: URL_CHAIN_B appears unused. Verify use (or export if used externally).

(SC2034)


[warning] 20-20: USER_ADDRESS appears unused. Verify use (or export if used externally).

(SC2034)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
🔇 Additional comments (1)
pages/stack/interop/tutorials/deploy-superchain-erc20.mdx (1)

1-21: Metadata verification:
All required metadata fields (title, lang, description, topic, personas, categories, content_type) are present and appear valid.

Comment on lines +7 to +8
if [ -z $1 ]
then
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Quote Variables in Condition Checks
The condition uses [ -z $1 ], which can lead to word-splitting issues if the argument contains spaces or is empty. Wrap $1 in quotes as follows:

- if [ -z $1 ]
+ if [ -z "$1" ]
📝 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
if [ -z $1 ]
then
if [ -z "$1" ]
then


rm -rf upgrade-erc20
mkdir upgrade-erc20
cd upgrade-erc20
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Improve Directory Change Error Handling
The command cd upgrade-erc20 does not check whether the directory change was successful. Consider adding error handling to exit if the directory doesn't exist or the change fails. For example:

- cd upgrade-erc20
+ cd upgrade-erc20 || { echo "Failed to enter upgrade-erc20 directory"; exit 1; }

Action: Enhance Directory Change Robustness

  • In public/tutorials/setup-for-erc20-upgrade.sh (line 5), ensure that changing into the upgrade-erc20 directory is verified.
  • Update the command as follows to abort execution if the directory change fails:
- cd upgrade-erc20
+ cd upgrade-erc20 || { echo "Failed to enter upgrade-erc20 directory"; exit 1; }
📝 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
cd upgrade-erc20
cd upgrade-erc20 || { echo "Failed to enter upgrade-erc20 directory"; exit 1; }
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 5-5: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

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

🧹 Nitpick comments (5)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (5)

1-5: Missing Required Metadata Fields
The frontmatter only includes title, lang, and description. For regular pages, the guidelines require additional fields such as topic, personas, categories, and content_type. Please add these required metadata fields to ensure proper categorization and compliance with documentation standards.


39-45: Comment Block Style
The commented-out block provides context and rationale. Although it’s not rendered, consider reviewing its punctuation for consistency if you plan to reactivate or repurpose it in documentation.

🧰 Tools
🪛 LanguageTool

[formatting] ~41-~41: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


122-133: Foundry Project Setup
The instructions for creating and initializing a Foundry project are clear. For consistency with documentation style, consider using the imperative mood (for example, "Create a Foundry project" instead of "We create a Foundry project").

🧰 Tools
🪛 LanguageTool

[uncategorized] ~124-~124: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~124-~124: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


150-158: Logs Section Example
The sample log output provides useful context with dummy addresses for the token, beacon, and proxy. Since these are illustrative values, consider adding a note that clarifies these are not production addresses.

🧰 Tools
🪛 Gitleaks (8.21.2)

154-154: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


259-285: Verification Steps Completeness
The verification instructions comprehensively cover balance checks on both chains and the token transfer process. As a minor nitpick, in the fourth verification step, consider rephrasing "The A chain" and "The B chain" to "Chain A" and "Chain B" for improved clarity.

🧰 Tools
🪛 LanguageTool

[grammar] ~280-~280: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 73f1f9f and 3968ad1.

📒 Files selected for processing (1)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (1 hunks)
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

[formatting] ~41-~41: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~47-~47: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do * Upgrade an existing ERC-20 that us...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~78-~78: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[uncategorized] ~124-~124: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~124-~124: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[grammar] ~280-~280: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)

🪛 Gitleaks (8.21.2)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

102-102: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


154-154: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


200-200: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
🔇 Additional comments (15)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (15)

7-7: Import Statement Verification
The import of { Callout, Steps, Tabs } from nextra/components is correct and follows best practices.


9-12: Callout Component Usage
The Callout block clearly communicates important production caveats about the sample code. This helps set user expectations regarding audit status.


14-14: Header Formatting
The header "Contract upgrade" uses sentence case appropriately.


16-19: Overview Section Clarity
The Overview section concisely explains the purpose of the tutorial and provides useful links to the relevant contracts. Ensure that the links remain updated with future changes.


20-30: Details Section Structure
The <details> element effectively outlines what the reader will learn and the prerequisites. The structure is clear; consider a quick review of punctuation if any inline notes are updated in future iterations.


47-50: "What you'll do" Section
The section clearly lists the tutorial goals. Maintaining this clarity is important; also, ensure that subsequent instructions consistently use the imperative voice.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~47-~47: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do * Upgrade an existing ERC-20 that us...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


51-54: Step-by-Step Introduction
The introduction to the step-by-step guide is clear and differentiates between using Supersim and deploying to development networks.


55-66: Supersim Installation Instructions
The "Install and run Supersim" step is clearly explained with an appropriate command block. It might be useful to add a note that this command is intended for test deployments only.


68-76: ERC-20 Token Setup on Chain A
The instructions to download, set permissions, and run the setup script are straightforward. Verify that the URL for the setup script remains correct.


78-82: Development Networks Deployment
The alternative command for deploying to development networks is concise and clear. No issues detected.

🧰 Tools
🪛 LanguageTool

[style] ~78-~78: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


84-91: Storing Contract Addresses
The snippet for storing the BEACON_ADDRESS and ERC20_ADDRESS is clear and follows standard shell practices.


113-118: Devnet Environment Variables
The Devnet tab provides clear instructions for setting environment variables using dynamic commands. This approach helps avoid hardcoding sensitive data.


135-143: Deployment Script Reference
The instruction to create the deployment script (script/LabSetup.s.sol) and its corresponding code block reference are well integrated into the tutorial. Confirm that the referenced file remains accessible in the repository.


144-149: Deploying on Chain B
The command for deploying contracts on chain B using Forge is straightforward and easy to follow.


288-293: Next Steps Section
The "Next steps" section effectively directs the reader to further actions, including deploying a SuperchainERC20 and exploring additional resources. This clear call-to-action helps guide the user’s next moves.

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

🧹 Nitpick comments (8)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (3)

39-45: Informal Comment Block Tone
The JSX comment block featuring “IMHO” in lines 39–45 uses informal language and personal tone. Consider rephrasing it in a neutral, professional style or removing it if no longer needed.

🧰 Tools
🪛 LanguageTool

[formatting] ~41-~41: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


145-154: Use Imperative Tone for Instruction
The sentence “We create a Foundry project and import the OpenZeppelin contracts…” should be rephrased using the imperative form (e.g., “Create a Foundry project and import…”) to align with documentation best practices.

Proposed Diff:

-  We create a [Foundry](https://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzeppelin.com/solidity-contracts) contracts, which were used for the original ERC-20 and proxy deployment.
+  Create a [Foundry](https://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzeppelin.com/solidity-contracts) contracts used for the original ERC-20 and proxy deployment.

32-37: Casual Language in Warning Block
The warning callout (lines 32–37) uses a friendly tone (“You're welcome to use it…”). For consistency with professional documentation, consider using a more neutral phrasing such as “You may use this sample code; however, for production purposes it is advisable to have it audited first.”

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (5)

18-20: Grammar Improvement: Add Missing Article and Adjust Noun Usage
The sentence “The lockbox is smart contract that accepts deposits…” is missing an article. Consider updating it to “The lockbox is a smart contract that accepts deposits of the original ERC-20 and issues an equivalent number of tokens…” for improved clarity and correctness.

Proposed Diff:

-The lockbox is smart contract that accepts deposits of the original ERC-20 and issues an equivalent amount of tokens that are Superchain interop compatible.
+The lockbox is a smart contract that accepts deposits of the original ERC-20 and issues an equivalent number of tokens that are Superchain interop compatible.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~18-~18: You might be missing the article “a” here.
Context: ...ss interop ## Overview The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~18-~18: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


24-29: Revise Learning Outcome Bullet Point
The bullet point under “What you'll learn” currently reads “how to take permissionlessly create a lockbox contract to enable Superchain interoperability.” This phrasing is awkward. Consider rephrasing it to “how to create a lockbox contract to enable permissionless Superchain interoperability.”

Proposed Diff:

-*   how to take permissionlessly create a lockbox contract to enable Superchain interoperability.
+*   How to create a lockbox contract to enable permissionless Superchain interoperability.

48-51: Clarify Instruction in “What you'll do” Section
The instruction “Create a lockbox SuperchainERC20 contract to permissionlessly enable interop.” could be clearer. Consider rewording it to “Create a lockbox SuperchainERC20 contract to enable permissionless interop.”

Proposed Diff:

-Create a lockbox `SuperchainERC20` contract to permissionlessly enable interop.
+Create a lockbox `SuperchainERC20` contract to enable permissionless interop.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~48-~48: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do Create a lockbox SuperchainERC20 con...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


325-332: Clarify Reference to “Another User”
In the section specifying configuration for another user (lines 325–332), the description refers to “another user that has ETH on both devnets.” For clarity and proper grammar, consider replacing “that” with “who” when referring to a person.

Proposed Diff:

-Specify the private key (`PRIVATE_KEY_2`) and user address (`USER_ADDRESS_2`) of another user that has ETH on both devnets.
+Specify the private key (`PRIVATE_KEY_2`) and user address (`USER_ADDRESS_2`) of another user who has ETH on both devnets.
🧰 Tools
🪛 Gitleaks (8.21.2)

329-329: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


40-46: Informal Comment Block Tone
The JSX comment block (lines 40–46) uses informal language and a subjective remark (“IMHO”). Consider revising or removing this comment to maintain a professional tone in the documentation.

🧰 Tools
🪛 LanguageTool

[formatting] ~42-~42: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3968ad1 and b0b71a2.

📒 Files selected for processing (2)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (1 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (1 hunks)
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx
🧠 Learnings (1)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (1)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:500-503
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Private keys in the "Upgrading ERC20 to SuperchainERC20" tutorial document are test/demo keys intentionally included for educational purposes and do not represent security concerns.
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

[formatting] ~41-~41: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~47-~47: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do * Upgrade an existing ERC-20 that us...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~110-~110: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[uncategorized] ~156-~156: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~156-~156: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~215-~215: A comma might be missing here.
Context: ... A when the original proxy contract was deployed this method is not available and you ha...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~215-~215: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...as deployed this method is not available and you have to either create a special bri...

(COMMA_COMPOUND_SENTENCE)


[grammar] ~312-~312: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx

[uncategorized] ~18-~18: You might be missing the article “a” here.
Context: ...ss interop ## Overview The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~18-~18: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~42-~42: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~48-~48: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do Create a lockbox SuperchainERC20 con...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~79-~79: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[formatting] ~186-~186: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...inERC20` contract does not need an owner, because minting and burning are handled by the ...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~200-~200: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~200-~200: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)


[uncategorized] ~237-~237: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...annotated-code/#_approve) to spend that amount of tokens from the original owner (`msg...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~253-~253: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ller. This should never fail, because lockbox ERC-20 tokens are supposed to a...

(COMMA_BEFORE_BECAUSE)


[formatting] ~293-~293: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)


[style] ~334-~334: Consider using “who” when you are referring to a person instead of an object.
Context: ...ress (USER_ADDRESS_2) of another user that has ETH on both devnets. </Tabs...

(THAT_WHO)

🪛 Gitleaks (8.21.2)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

134-134: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


186-186: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


232-232: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx

103-103: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


329-329: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🔇 Additional comments (4)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (2)

7-12: MDX Component and Callout Usage
The usage of the <Callout> component to highlight production-readiness and active development status is clear and informative. No changes are needed here.


255-259: Next Steps Section Clarity
The “Next steps” section is concise and appropriately formatted. Ensure that the linked pages (e.g., “SuperchainERC20,” “revolutionary app”) use consistent title case as per the documentation guidelines.

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (2)

110-118: Review of Environment Variable Example for Supersim
The configuration examples, including the sample private key and user address, are clearly marked for demonstration purposes. Given the retrieved learnings that these keys are intentional dummy values, no changes are needed.


361-366: Next Steps Section Clarity
The “Next steps” section is well structured. Ensure that the link names and button/text labels adhere to the documentation’s style guidelines regarding title case versus sentence case.

qbzzt and others added 3 commits April 4, 2025 12:10
…box.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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

🧹 Nitpick comments (5)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (2)

43-49: Internal comment style in the warning block.
There is an inline commented-out block (lines 43–49) that uses informal language (e.g. “IMHO”). For documentation intended for production, consider rewording this feedback to a neutral tone or removing it entirely to maintain professionalism.

🧰 Tools
🪛 LanguageTool

[formatting] ~45-~45: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


324-329: Next steps clarity and consistency.
The “Next steps” section is concise. As a minor note, please ensure that token naming is used consistently throughout the documentation (e.g. decide between “ERC20” and “ERC-20”) to avoid potential confusion.

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (3)

20-24: Overview text clarity.
In the Overview, the sentence “The lockbox is smart contract that accepts deposits...” would read better as “The lockbox is a smart contract that accepts deposits…” to improve grammatical clarity.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: You might be missing the article “a” here.
Context: ...ss interop ## Overview The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~22-~22: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


44-50: Internal comment block style.
Similar to the proxy upgrade file, there is an internal commented-out block discussing the rationale behind displaying the warning. Consider removing or rewording it to avoid informal language in production documentation.

🧰 Tools
🪛 LanguageTool

[formatting] ~46-~46: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


52-56: “What you'll do” section wording.
The instruction “Create a lockbox SuperchainERC20 contract to permissionlessly enable interop” could be refined for clarity. For instance, “Deploy a LockboxSuperchainERC20 contract to enable permissionless interoperability” might convey the intent more directly.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~52-~52: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do Create a lockbox SuperchainERC20 con...

(AI_EN_LECTOR_MISSING_PUNCTUATION)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b0b71a2 and 4640c8a.

📒 Files selected for processing (3)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (1 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (1 hunks)
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx
🧠 Learnings (3)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (1)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx:137-143
Timestamp: 2025-04-04T17:15:25.133Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" in the SuperchainERC20 tutorial is intentionally included as a testing key and is harmless to disclose.
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (1)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:500-503
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Private keys in the "Upgrading ERC20 to SuperchainERC20" tutorial document are test/demo keys intentionally included for educational purposes and do not represent security concerns.
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (3)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:500-503
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Private keys in the "Upgrading ERC20 to SuperchainERC20" tutorial document are test/demo keys intentionally included for educational purposes and do not represent security concerns.
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx:137-143
Timestamp: 2025-04-04T17:15:25.133Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" in the SuperchainERC20 tutorial is intentionally included as a testing key and is harmless to disclose.
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:93-99
Timestamp: 2025-04-03T17:34:05.701Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" is a well-known test private key used in Hardhat/Foundry development environments and does not need to be flagged as a security concern in documentation or tutorials.
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

[formatting] ~45-~45: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~51-~51: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do * Upgrade an existing ERC-20 that us...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~114-~114: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[uncategorized] ~160-~160: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~160-~160: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~219-~219: A comma might be missing here.
Context: ... A when the original proxy contract was deployed this method is not available and you ha...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~219-~219: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...as deployed this method is not available and you have to either create a special bri...

(COMMA_COMPOUND_SENTENCE)


[grammar] ~316-~316: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx

[uncategorized] ~22-~22: You might be missing the article “a” here.
Context: ...ss interop ## Overview The lockbox is smart contract that accepts deposits of the o...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


[uncategorized] ~22-~22: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~46-~46: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~52-~52: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do Create a lockbox SuperchainERC20 con...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~83-~83: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[formatting] ~190-~190: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...inERC20` contract does not need an owner, because minting and burning are handled by the ...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~204-~204: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~204-~204: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)


[uncategorized] ~241-~241: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...annotated-code/#_approve) to spend that amount of tokens from the original owner (`msg...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~257-~257: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ller. This should never fail, because lockbox ERC-20 tokens are supposed to a...

(COMMA_BEFORE_BECAUSE)


[formatting] ~297-~297: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)


[style] ~338-~338: Consider using “who” when you are referring to a person instead of an object.
Context: ...ress (USER_ADDRESS_2) of another user that has ETH on both devnets. </Tabs...

(THAT_WHO)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx

[formatting] ~30-~30: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)

🪛 Gitleaks (8.21.2)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

138-138: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


190-190: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


236-236: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx

107-107: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


333-333: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🔇 Additional comments (14)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (4)

1-9: Frontmatter completeness and accuracy.
The frontmatter includes all required metadata fields (title, lang, description, topic, personas, categories, and content_type) which is excellent.


11-16: Import statements and initial Callout.
The import of components from nextra/components and the introductory Callout block are clear and well formatted.


55-82: Diagrams for proxy mechanics.
The mermaid diagrams illustrating how beacon proxies work are detailed and helpful for readers. They clearly model the sequence of proxy calls and upgrade interactions.


87-323: Detailed Instructions Section.
The step‐by‐step instructions for upgrading the proxied contract are comprehensive and well organized. The structure (installation steps, proxy explanation, and subsequent actions) is logical.

🧰 Tools
🪛 LanguageTool

[style] ~114-~114: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[uncategorized] ~160-~160: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~160-~160: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~219-~219: A comma might be missing here.
Context: ... A when the original proxy contract was deployed this method is not available and you ha...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~219-~219: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...as deployed this method is not available and you have to either create a special bri...

(COMMA_COMPOUND_SENTENCE)


[grammar] ~316-~316: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)

🪛 Gitleaks (8.21.2)

138-138: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


190-190: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


236-236: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (4)

7-9: Import and introductory Callout.
The imported components and the initial Callout warning regarding audit status are clear. The cautionary advice about sample code is appropriately emphasized.


15-26: Tutorial title and Overview.
The title “Upgrading ERC20 to SuperchainERC20” and the subsequent overview effectively introduce the tutorial’s purpose. The reference links to external explainer pages and contracts add valuable context.


38-48: Mermaid diagram for upgrade options.
The diagram succinctly illustrates the decision flow for upgrading an ERC20 token—whether to deploy a new contract, use a lockbox, or perform a proxy upgrade. It is visually clear and instructive.


51-63: Cards and Next Steps sections.
The Cards component effectively highlights related tutorials (e.g. “Contract upgrade” and “Lockboxes for permissionless interop”). The “Next steps” bullet list clearly guides the reader on subsequent actions.

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (6)

1-9: Frontmatter completeness in Lockbox tutorial.
The frontmatter in this file correctly includes all required fields (title, lang, description, topic, personas, categories, and content_type).


57-125: Step-by-step instructions and environment setup.
The instructions are detailed and the inclusion of shell command blocks (for installing Supersim, setting up the ERC-20 token, and storing addresses) is very helpful. The test keys (e.g. the PRIVATE_KEY) are clearly dummy values as confirmed by previous learnings, so their inclusion is acceptable for tutorial purposes.

🧰 Tools
🪛 LanguageTool

[style] ~83-~83: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)

🪛 Gitleaks (8.21.2)

107-107: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


137-171: Deployment utilities updates.
The explanation and instructions for updating package.json and creating the LockboxDeployer.s.sol file are comprehensive. The use of details and code filenames helps guide the reader.


213-219: Contract creation instructions.
The steps to create the LockboxSuperchainERC20.sol file are clear, with supporting details provided through expandable explanations.


288-362: Verification instructions.
The verification steps (checking balances, token transfers, and redemption tests) are thoroughly described with clear shell command examples. This makes it straightforward for readers to verify their deployments.

🧰 Tools
🪛 LanguageTool

[formatting] ~297-~297: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)


[style] ~338-~338: Consider using “who” when you are referring to a person instead of an object.
Context: ...ress (USER_ADDRESS_2) of another user that has ETH on both devnets. </Tabs...

(THAT_WHO)

🪛 Gitleaks (8.21.2)

333-333: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


367-370: Next steps section.
The concluding “Next steps” section is clear, offering additional resources and guidance. Overall, the lockbox tutorial is comprehensive and well structured.

qbzzt and others added 2 commits April 4, 2025 12:38
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 0

♻️ Duplicate comments (1)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1)

1-5: 🛠️ Refactor suggestion

Missing metadata fields in frontmatter.
The frontmatter is missing the required keys topic, personas, categories, and content_type. For a regular page, these fields must be non-empty to comply with documentation standards.

 --- current
 title: Upgrading ERC20 to SuperchainERC20
 lang: en-US
 description: Tutorial on how to take an existing ERC20 and upgrade it to SuperchainERC20.
 ---
+topic: Interoperability
+personas: [Developer]
+categories: [Tutorial, Interop]
+content_type: article
🧹 Nitpick comments (2)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (2)

20-25: Warning callout clarity and tone.
The warning callout effectively communicates that the sample code has not been audited. For a more formal tone, consider rephrasing “you're welcome to use it” with an imperative directive.


27-33: Internal comment block review.
This comment block appears to be for internal guidance (e.g., use of “IMHO”). Before final publication, remove or refine internal notes to avoid exposing draft commentary to end users.

Additionally, note the static analysis hint regarding the comma before “because” on line 29—ensure that punctuation serves the intended meaning if you decide to keep any internal notes.

🧰 Tools
🪛 LanguageTool

[formatting] ~29-~29: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4640c8a and 1eb5657.

📒 Files selected for processing (1)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1 hunks)
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx
🧠 Learnings (1)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (3)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:500-503
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Private keys in the "Upgrading ERC20 to SuperchainERC20" tutorial document are test/demo keys intentionally included for educational purposes and do not represent security concerns.
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx:137-143
Timestamp: 2025-04-04T17:15:25.133Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" in the SuperchainERC20 tutorial is intentionally included as a testing key and is harmless to disclose.
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:93-99
Timestamp: 2025-04-03T17:34:05.701Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" is a well-known test private key used in Hardhat/Foundry development environments and does not need to be flagged as a security concern in documentation or tutorials.
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx

[formatting] ~29-~29: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
🔇 Additional comments (8)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (8)

7-7: Import statement is correct.
The import of { Callout, Steps, Card, Cards } from nextra/components is appropriate and aligns with the project’s component usage.


9-12: Callout component usage is appropriate.
The initial callout clearly informs users about the production readiness of the SuperchainERC20 standard.


14-14: H1 header formatting.
The H1 “Upgrading ERC20 to SuperchainERC20” is clear and sufficiently descriptive. Ensure consistency with naming conventions across the documentation.


16-19: Overview section clarity.
The overview section succinctly explains the upgrade process and includes well-integrated links to additional resources. Double-check that linked resources remain up-to-date.


35-36: Content clarity in upgrade options.
The introductory paragraph to the upgrade methods is clear. Verify that the instruction “click any of the green rectangles” accurately reflects the UI design so that users can easily identify these actionable elements.


37-47: Mermaid diagram structural review.
The Mermaid diagram neatly outlines the decision process involved in upgrading an ERC20 token. Ensure that all hyperlink URLs (e.g., for new contract deployment, lockbox, and proxy upgrade) correctly resolve in the deployed documentation.


50-53: Cards component structure.
The Cards component effectively presents the upgrade options with clear titles, links, and icons. Confirm that the icon paths (e.g., /img/icons/shapes.svg) are correct within the project.


55-60: Next steps section clarity.
The bullet-pointed “Next steps” provide straightforward guidance for further actions. Ensure that all links (such as /deploy-superchain-erc20 and /stack/interop/superchain-erc20) are accurate and that the language is consistent and directive throughout the documentation.

@qbzzt qbzzt requested a review from zainbacchus April 4, 2025 17:58
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: 0

🧹 Nitpick comments (5)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (5)

11-11: Import Statement Review
The import on line 11 includes Callout, Steps, Card, and Cards from nextra/components. Note that the Steps component is not used in the remainder of the document. Consider removing it to keep the imports clean.

- import { Callout, Steps, Card, Cards } from 'nextra/components'
+ import { Callout, Card, Cards } from 'nextra/components'

18-18: Header Naming Convention
The H1 header “Upgrading ERC20 to SuperchainERC20” is clear. Ensure that the use of “ERC20” (without the hyphen) is consistent throughout the documentation, as past reviews have noted inconsistencies in similar documents.


24-29: Warning Callout Tone
The warning callout clearly warns that the sample code is provided as-is and has not been fully audited. To maintain an impersonal tone, consider rephrasing “we ran it, and it works as advertised” to “The sample code has been executed and functions as intended.”


31-37: Internal Comment Formatting
The MDX comment block contains a note that uses a comma before "because." For better clarity and to align with the suggested formatting, consider removing the comma before "because."

🧰 Tools
🪛 LanguageTool

[formatting] ~33-~33: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)


54-60: Cards Component Accessibility
The Cards component effectively links to the relevant sections. For improved accessibility, consider adding descriptive alt attributes in the <img> tags. For example:

-  <Card title="Contract upgrade" href="/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade" icon={<img src="/img/icons/shapes.svg" />} />
+  <Card title="Contract upgrade" href="/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade" icon={<img src="/img/icons/shapes.svg" alt="Icon for contract upgrade" />} />

Similarly, add alt text to the second card’s image.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1eb5657 and 384c99d.

📒 Files selected for processing (1)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (1 hunks)
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx
🧠 Learnings (1)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (3)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:500-503
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Private keys in the "Upgrading ERC20 to SuperchainERC20" tutorial document are test/demo keys intentionally included for educational purposes and do not represent security concerns.
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx:137-143
Timestamp: 2025-04-04T17:15:25.133Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" in the SuperchainERC20 tutorial is intentionally included as a testing key and is harmless to disclose.
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:93-99
Timestamp: 2025-04-03T17:34:05.701Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" is a well-known test private key used in Hardhat/Foundry development environments and does not need to be flagged as a security concern in documentation or tutorials.
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx

[formatting] ~33-~33: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has, IMHO, code that is a...

(COMMA_BEFORE_BECAUSE)

🔇 Additional comments (5)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx (5)

1-9: Frontmatter Metadata Review
The frontmatter contains all the required fields (title, lang, description, topic, personas, categories, content_type) and none of them are empty. The metadata appears to be correct and complete.


13-16: Callout Component Review
The primary Callout (lines 13–16) effectively communicates the production-readiness of the SuperchainERC20 standard and the active development of the interoperability upgrade. The messaging is clear and informative.


20-22: Overview Section Review
The Overview section provides a concise explanation of the tutorial purpose and includes proper links to related resources. It meets the informational requirements effectively.


41-51: Mermaid Diagram Review
The Mermaid diagram is well-structured and clearly illustrates the decision flow for upgrading an ERC20 token. The use of labels and links appears correct.


61-66: Next Steps Section Review
The “Next steps” section provides a clear, actionable list of follow-up directions with properly formatted links. This section is well structured and easy to follow.

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

🧹 Nitpick comments (5)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (2)

91-322: Comprehensive Deployment Instructions
The "Steps" section offers thorough deployment instructions—from running Supersim and setting up the ERC20 token on chain A to updating environment variables and verifying balances across chains. The detailed code blocks and commands are very instructional.
There are a few long-winded sentences where static analysis suggests minor punctuation improvements (e.g., review comma usage before “because”). A brief cleanup for readability could be beneficial.

🧰 Tools
🪛 LanguageTool

[style] ~114-~114: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[uncategorized] ~160-~160: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~160-~160: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~219-~219: A comma might be missing here.
Context: ... A when the original proxy contract was deployed this method is not available and you ha...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~219-~219: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...as deployed this method is not available and you have to either create a special bri...

(COMMA_COMPOUND_SENTENCE)


[grammar] ~316-~316: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)

🪛 Gitleaks (8.21.2)

138-138: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


190-190: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


236-236: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


137-143: Test Key Acknowledgment
The command block providing the test private key and related parameters is clear and, as confirmed by prior learnings, intentionally uses a well‐known test key. You might consider adding a short note emphasizing that these keys are solely for demonstration purposes and should not be used in production.

🧰 Tools
🪛 Gitleaks (8.21.2)

138-138: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (3)

25-35: About This Tutorial Section
The “About this tutorial” segment is useful for setting expectations. However, the bullet point on line 30 contains awkward phrasing ("how to take permissionlessly create a lockbox contract"). Consider rephrasing this to “how to create a lockbox contract permissionlessly” for clarity.


107-116: Environment Variables Setup
The provided commands for setting environment variables (including the use of a test-private key) are detailed and correctly formatted. As with the proxy upgrade file, consider adding a note that these keys are for testing/demo purposes only.

🧰 Tools
🪛 Gitleaks (8.21.2)

107-107: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


22-370: Minor Punctuation and Grammar Suggestions
Several minor punctuation and grammatical suggestions from static analysis (for example, regarding comma usage before “because” and the phrasing “how to take permissionlessly create”) could be addressed to improve readability. A brief pass over the text for such refinements would polish the tutorial further.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~46-~46: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has code that is a lot mo...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~52-~52: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do Create a lockbox SuperchainERC20 con...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~83-~83: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[formatting] ~190-~190: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...inERC20` contract does not need an owner, because minting and burning are handled by the ...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~204-~204: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~204-~204: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)


[uncategorized] ~241-~241: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...annotated-code/#_approve) to spend that amount of tokens from the original owner (`msg...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~257-~257: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ller. This should never fail, because lockbox ERC-20 tokens are supposed to a...

(COMMA_BEFORE_BECAUSE)


[formatting] ~297-~297: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)


[style] ~338-~338: Consider using “who” when you are referring to a person instead of an object.
Context: ...ress (USER_ADDRESS_2) of another user that has ETH on both devnets. </Tabs...

(THAT_WHO)

🪛 Gitleaks (8.21.2)

107-107: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


333-333: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 384c99d and 9bcaaeb.

📒 Files selected for processing (2)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (1 hunks)
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (1 hunks)
🧰 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:
    1. 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]
    ---
    1. 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]
    ---
    1. 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:
    1. Use sentence case, capitalizing only the first word.
    2. 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.
    3. 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/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx
  • pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx
🧠 Learnings (2)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (1)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:500-503
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Private keys in the "Upgrading ERC20 to SuperchainERC20" tutorial document are test/demo keys intentionally included for educational purposes and do not represent security concerns.
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (3)
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx:137-143
Timestamp: 2025-04-04T17:15:25.133Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" in the SuperchainERC20 tutorial is intentionally included as a testing key and is harmless to disclose.
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:500-503
Timestamp: 2025-04-03T17:33:58.612Z
Learning: Private keys in the "Upgrading ERC20 to SuperchainERC20" tutorial document are test/demo keys intentionally included for educational purposes and do not represent security concerns.
Learnt from: qbzzt
PR: ethereum-optimism/docs#1525
File: pages/stack/interop/tutorials/upgrade-to-superchain-erc20.mdx:93-99
Timestamp: 2025-04-03T17:34:05.701Z
Learning: The private key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" is a well-known test private key used in Hardhat/Foundry development environments and does not need to be flagged as a security concern in documentation or tutorials.
🪛 LanguageTool
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx

[uncategorized] ~22-~22: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~46-~46: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has code that is a lot mo...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~52-~52: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do Create a lockbox SuperchainERC20 con...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~83-~83: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[formatting] ~190-~190: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...inERC20` contract does not need an owner, because minting and burning are handled by the ...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~204-~204: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~204-~204: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)


[uncategorized] ~241-~241: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...annotated-code/#_approve) to spend that amount of tokens from the original owner (`msg...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~257-~257: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ller. This should never fail, because lockbox ERC-20 tokens are supposed to a...

(COMMA_BEFORE_BECAUSE)


[formatting] ~297-~297: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)


[style] ~338-~338: Consider using “who” when you are referring to a person instead of an object.
Context: ...ress (USER_ADDRESS_2) of another user that has ETH on both devnets. </Tabs...

(THAT_WHO)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

[formatting] ~45-~45: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has code that is a lot mo...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~51-~51: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do * Upgrade an existing ERC20 that use...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~114-~114: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[uncategorized] ~160-~160: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...> ### Create a Foundry project We create a [Foundry](https://book.getfoundry.sh/...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~160-~160: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...ttps://book.getfoundry.sh/) project and import the [OpenZeppelin](https://www.openzepp...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~219-~219: A comma might be missing here.
Context: ... A when the original proxy contract was deployed this method is not available and you ha...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~219-~219: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...as deployed this method is not available and you have to either create a special bri...

(COMMA_COMPOUND_SENTENCE)


[grammar] ~316-~316: Two determiners in a row. Choose either “The” or “A”.
Context: ... ``` 4. See the new balances. The A chain should have 0.9 tokens, and the B...

(DT_DT)

🪛 Gitleaks (8.21.2)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx

107-107: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


333-333: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx

138-138: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


190-190: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


236-236: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - docs-optimism
  • GitHub Check: Header rules - docs-optimism
  • GitHub Check: Pages changed - docs-optimism
🔇 Additional comments (17)
pages/stack/interop/tutorials/upgrade-to-superchain-erc20/proxy-upgrade.mdx (7)

1-9: Frontmatter Completeness
The frontmatter includes all the required keys (title, lang, description, topic, personas, categories, content_type) with non‐empty values, which meets our documentation guidelines.


11-11: Import Components
The file imports the necessary components (Callout, Steps, and Tabs) from 'nextra/components'. Ensure that each imported component is used within the file.


13-16: Introductory Callout Block
The callout clearly informs readers that the SuperchainERC20 standard is production-ready and notes the ongoing development of the OP Stack interoperability upgrade. This helps set proper expectations.


18-24: Effective Headers and Overview
The main heading ("Contract upgrade") and the overview provide a concise introduction to the tutorial. The explanation of upgrading an ERC20 to enable interop through a proxy is clear and informative.


25-34: Tutorial Summary Section
The “About this tutorial” details effectively outline what users will learn and the prerequisites required. This section sets clear expectations for the tutorial’s content.


57-64: Mermaid Diagram Clarity (Part 1)
The first Mermaid sequence diagram illustrates the proxy pattern with clear labels and flow. Verify that the placeholder addresses (e.g. 0xBAD0...60A7) are acceptable for your documentation conventions.


71-82: Mermaid Diagram Clarity (Part 2)
The second Mermaid diagram accurately depicts the upgrade process via the beacon proxy. The sequence and the depiction of contract interactions are well structured.

pages/stack/interop/tutorials/upgrade-to-superchain-erc20/lockbox.mdx (10)

1-9: Frontmatter Verification
The frontmatter in this file includes all the required metadata fields (title, lang, description, topic, personas, categories, content_type) with proper, non‐empty values.


11-11: Import Statement Check
The import for { Steps, Callout, Tabs } from 'nextra/components' is correctly included. Please confirm that all these components are indeed used in the subsequent content.


13-16: Introductory Callout Review
The callout effectively reiterates that the SuperchainERC20 standard is production-ready while reminding readers of the active development in interoperability upgrades.


18-24: Effective Heading and Overview
The main heading ("Lockboxes for permissionless interop") and the overview clearly communicate the tutorial’s goal. The explanation of the lockbox mechanism is straightforward and instructive.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


60-90: Initial Setup Instructions Clarity
The instructions to install and run Supersim and to set up the ERC-20 token on chain A are well organized. The code blocks for these commands are clear and easy to follow.

🧰 Tools
🪛 LanguageTool

[style] ~83-~83: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


137-170: Deployment Utilities Update
The instructions for updating the deployment utilities—replacing packages/contracts/package.json and installing the SuperchainERC20 starter kit—are clear and comprehensive. The commands and steps are well documented.


172-211: LockboxDeployer Script Instructions
The explanations and steps for creating the LockboxDeployer.s.sol file provide clear context for the modifications from the standard SuperchainERC20 deployer. The warning regarding the usage of a timestamp-based salt in development (and its removal in production) is particularly valuable.

🧰 Tools
🪛 LanguageTool

[formatting] ~190-~190: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...inERC20` contract does not need an owner, because minting and burning are handled by the ...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~204-~204: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~204-~204: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)


213-278: Contract Creation and Deployment Commands
The detailed instructions for creating, deploying, and verifying the LockboxSuperchainERC20 contract are very well structured. The use of Tabs to differentiate between Supersim and Devnets environments enhances clarity.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~241-~241: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...annotated-code/#_approve) to spend that amount of tokens from the original owner (`msg...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~257-~257: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ller. This should never fail, because lockbox ERC-20 tokens are supposed to a...

(COMMA_BEFORE_BECAUSE)


282-363: Verification Procedures
The verification steps—including checking balances, approving and locking tokens, and validating transfers across chains—are comprehensive. These step-by-step instructions should effectively help users confirm that the deployment was successful.

🧰 Tools
🪛 LanguageTool

[formatting] ~297-~297: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)


[style] ~338-~338: Consider using “who” when you are referring to a person instead of an object.
Context: ...ress (USER_ADDRESS_2) of another user that has ETH on both devnets. </Tabs...

(THAT_WHO)

🪛 Gitleaks (8.21.2)

333-333: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


1-370: Overall Assessment
This tutorial is comprehensive and follows the documentation guidelines closely. The step-by-step instructions, detailed code blocks, and clear warnings (such as the one regarding non-production-ready code) make it a valuable resource. Addressing the minor nitpicks and refining a few sentences will further enhance clarity and professionalism.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...riginal ERC-20 and issues an equivalent amount of tokens that are Superchain interop c...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~46-~46: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ere, when we don't have it on most pages, because this tutorial has code that is a lot mo...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~52-~52: A punctuation mark might be missing here.
Context: ...exact job needed. */} ### What you'll do Create a lockbox SuperchainERC20 con...

(AI_EN_LECTOR_MISSING_PUNCTUATION)


[style] ~83-~83: Consider using a more polite wording.
Context: ...up-for-erc20-upgrade.sh ``` If you want to deploy to the [development networks]...

(IF_YOU_WANT)


[formatting] ~190-~190: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...inERC20` contract does not need an owner, because minting and burning are handled by the ...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~204-~204: A comma is probably missing here.
Context: ... experience improvement. During development you redeploy slightly modified code a l...

(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)


[style] ~204-~204: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative.
Context: ...ent you redeploy slightly modified code a lot of times. It is easier if you don'...

(A_LOT_OF)


[uncategorized] ~241-~241: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...annotated-code/#_approve) to spend that amount of tokens from the original owner (`msg...

(AMOUNTOF_TO_NUMBEROF)


[formatting] ~257-~257: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ller. This should never fail, because lockbox ERC-20 tokens are supposed to a...

(COMMA_BEFORE_BECAUSE)


[formatting] ~297-~297: Consider inserting a comma after ‘this’.
Context: ...n in the lockbox ERC-20 contract. To do this we first need to give the lockbox ERC-2...

(TO_VERB_COMMA)


[style] ~338-~338: Consider using “who” when you are referring to a person instead of an object.
Context: ...ress (USER_ADDRESS_2) of another user that has ETH on both devnets. </Tabs...

(THAT_WHO)

🪛 Gitleaks (8.21.2)

107-107: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


333-333: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

@@ -45,6 +45,11 @@ This requirement abstracts away the complexity of cross-chain validation.
Achieving this requires deterministic deployment methods. There are multiple ways to do this.
Here we will use the [SuperchainERC20 Starter Kit](/app-developers/starter-kit).

<Callout>
Copy link
Member

Choose a reason for hiding this comment

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

Avoid using ./ in links- this can cause issues when we move files around if the directory structure changes.


## Overview

This guide explains how to upgrade an ERC20 to a [`SuperchainERC20`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainERC20.sol) that can teleport across the [Superchain interop cluster](/stack/interop/explainer#superchain-interop-cluster) using the [`SuperchainTokenBridge`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainTokenBridge.sol) contract. For more information on how it works, [see the explainer](/stack/interop/superchain-erc20).
Copy link
Member

Choose a reason for hiding this comment

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

Is teleport the correct phrasing here? Doesn't seem accurate unless we're using that language elsewhere

You're welcome to use it, but if you need it for production purposes you should get it audited first.
</Callout>

{/*
Copy link
Member

Choose a reason for hiding this comment

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

Good callout!


*/}

There are several ways to upgrade an existing ERC20 for interop, depending on the exact circumstances. Click any of the green rectangles for directions.
Copy link
Member

Choose a reason for hiding this comment

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

I like the idea behind it, but this doesn't work IMO. It's far too hard to parse if folks are just trying to figure out where to go.

We should either redo the diagram at a design level, or explore other way to funnel folks into the correct area

Copy link
Member

Choose a reason for hiding this comment

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

Also they rectangles are orange haha

```


<Cards>
Copy link
Member

Choose a reason for hiding this comment

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

Also i'm not sure what the relationship between the diagram above and these cards. Do we need both??

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.

3 participants