Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

SuperchainERC20 best practices #1061

Merged
merged 10 commits into from
Nov 8, 2024
Merged

SuperchainERC20 best practices #1061

merged 10 commits into from
Nov 8, 2024

Conversation

bradleycamacho
Copy link
Member

This explainer covers best practices for deploying SuperchainERC20 tokens

Closes https://github.com/ethereum-optimism/devrel/issues/379

Copy link

netlify bot commented Nov 1, 2024

Deploy Preview for docs-optimism ready!

Name Link
🔨 Latest commit a8e761b
🔍 Latest deploy log https://app.netlify.com/sites/docs-optimism/deploys/672d66352f9f020008eaa611
😎 Deploy Preview https://deploy-preview-1061--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.

@bradleycamacho
Copy link
Member Author

This doc is a bit barebones in places. If there are any "gotchas" or things folks should know, drop a comment and we'll get them included!

Copy link
Contributor

coderabbitai bot commented Nov 1, 2024

Warning

Rate limit exceeded

@bradleycamacho has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 47 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 2c5220d and a8e761b.

Walkthrough

The changes in this pull request include the addition of a new entry in the JSON metadata file for SuperchainERC20 best practices, the creation of a new documentation file detailing these best practices, and modifications to an existing words list file. The new documentation emphasizes consistent token management across Superchain networks and outlines essential practices for deployment and testing. Additionally, several terms were removed from the words list, and one new term was added.

Changes

File Path Change Summary
pages/stack/interop/_meta.json Added entry: "superchainERC20-best-practices": "SuperchainERC20 best practices"; added comma for formatting.
pages/stack/interop/superchainerc20-best-practices.mdx Created new file with guidelines on managing SuperchainERC20 tokens and best practices.
words.txt Removed entries: Ankr, Immunefi, Mitigations, Pyth, Sepolia, voxel; added entry: zora; changed casing for accountqueue and accountslots.

Possibly related PRs

  • interop explainers #825: This PR introduces new interop explainers, which are directly related to the changes made in the main PR regarding the addition of best practices for SuperchainERC20.
  • Edit SuperchainERC20 consistency #972: This PR focuses on editing the terminology related to SuperchainERC20, ensuring consistency in the documentation, which aligns with the main PR's updates to the SuperchainERC20 best practices.
  • superchainERC20 #986: This PR adds a new key for the SuperchainERC20 in the metadata, which is directly related to the changes made in the main PR regarding the documentation of SuperchainERC20 best practices.
  • superchain-weth #1043: This PR adds a new entry for SuperchainWETH in the metadata, which is relevant as it complements the main PR's focus on best practices for SuperchainERC20, indicating a broader context of interoperability.
  • How to transfer a SuperchainERC20 #1048: This PR provides guidance on transferring SuperchainERC20 tokens, which is directly related to the main PR's focus on best practices for SuperchainERC20.
  • Clarify SuperchainERC20 supply considerations #1051: This PR clarifies that the supply of assets remains unaffected when moving across the Superchain, which is relevant to the main PR's focus on best practices for SuperchainERC20 and its operational mechanics.

Suggested labels

documentation

Suggested reviewers

  • cpengilly
  • zainbacchus
  • sbvegan

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

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

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

CodeRabbit Commands (Invoked using PR comments)

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

Other keywords and placeholders

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

Documentation and Community

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

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

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 0e1e783 and ddf5ea9.

📒 Files selected for processing (3)
  • pages/stack/interop/_meta.json (1 hunks)
  • pages/stack/interop/superchainerc20-best-practices.mdx (1 hunks)
  • words.txt (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • pages/stack/interop/_meta.json
  • words.txt
🧰 Additional context used
📓 Path-based instructions (1)
pages/stack/interop/superchainerc20-best-practices.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • 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.
    "
🪛 LanguageTool
pages/stack/interop/superchainerc20-best-practices.mdx

[misspelling] ~29-~29: This word is normally spelled as one.
Context: ...s such as maximum balance transfers and inter-chain latency to ensure asset reliability acr...

(EN_COMPOUNDS_INTER_CHAIN)

🪛 GitHub Check: lint
pages/stack/interop/superchainerc20-best-practices.mdx

[warning] 23-23:
Remove 1 space before this heading’s content

🔇 Additional comments (3)
pages/stack/interop/superchainerc20-best-practices.mdx (3)

1-5: LGTM! Frontmatter is well-structured.

The metadata is properly formatted with clear title and description.


7-11: LGTM! Clear title and introduction.

The introduction effectively sets the context and includes crucial information about token supply behavior.


31-35: LGTM! Well-structured next steps section.

The section provides clear, relevant follow-up resources with properly formatted links.

pages/stack/interop/superchainerc20-best-practices.mdx Outdated Show resolved Hide resolved
pages/stack/interop/superchainerc20-best-practices.mdx Outdated Show resolved Hide resolved
pages/stack/interop/superchainerc20-best-practices.mdx Outdated Show resolved Hide resolved
Copy link
Contributor

@zainbacchus zainbacchus left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@zainbacchus zainbacchus left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@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

🧹 Outside diff range and nitpick comments (1)
pages/stack/interop/superchainerc20-best-practices.mdx (1)

15-17: Consider making the deployment guidance more actionable.

The explanation about predefined addresses could be more specific about implementation steps.

-Use predefined addresses: Assign and verify the same address for each `SuperchainERC20` instance on every chain. Predefined addresses reduce deployment conflicts and ensure tokens are accurately recognized across chains. Otherwise, the SuperchainERC20Bridge would need a way to verify if the tokens they mint on destination correspond to the tokens that were burned on source.
+To ensure consistent addresses across chains:
+1. Use `Create2Deployer` or [predeploys](https://specs.optimism.io/interop/predeploys.html) to generate deterministic addresses
+2. Verify the same address is used for each `SuperchainERC20` instance on every chain
+3. Document the deployment addresses for future reference
+
+This approach prevents deployment conflicts and ensures reliable token recognition across chains, eliminating the need for additional verification in the SuperchainERC20Bridge.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ddf5ea9 and 2c5220d.

📒 Files selected for processing (1)
  • pages/stack/interop/superchainerc20-best-practices.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pages/stack/interop/superchainerc20-best-practices.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • 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.
    "
🪛 LanguageTool
pages/stack/interop/superchainerc20-best-practices.mdx

[misspelling] ~25-~25: This word is normally spelled as one.
Context: ...s such as maximum balance transfers and inter-chain latency to ensure asset reliability acr...

(EN_COMPOUNDS_INTER_CHAIN)

🔇 Additional comments (5)
pages/stack/interop/superchainerc20-best-practices.mdx (5)

1-5: LGTM! Frontmatter follows the documentation guidelines.

The metadata is well-structured with appropriate title case and description.


7-11: LGTM! Clear and well-structured introduction.

The introduction effectively sets context and maintains consistent technical terminology.


23-23: Remove personal pronoun.

Replace "We recommend" to maintain consistency in communal documentation.

-We recommend using [Supersim](https://supersim.pages.dev/introduction) as an easy way to simulate the Superchain and test your SuperchainERC20 deployment.
+Using [Supersim](https://supersim.pages.dev/introduction) provides an easy way to simulate the Superchain and test your SuperchainERC20 deployment.

25-25: Fix compound word spelling.

"inter-chain" should be written as "interchain".

-Test edge cases such as maximum balance transfers and inter-chain latency to ensure asset reliability across different scenarios.
+Test edge cases such as maximum balance transfers and interchain latency to ensure asset reliability across different scenarios.
🧰 Tools
🪛 LanguageTool

[misspelling] ~25-~25: This word is normally spelled as one.
Context: ...s such as maximum balance transfers and inter-chain latency to ensure asset reliability acr...

(EN_COMPOUNDS_INTER_CHAIN)


27-31: LGTM! Well-structured next steps section.

The links are properly formatted and provide a clear learning path.

@bradleycamacho bradleycamacho merged commit 29c1d64 into main Nov 8, 2024
8 of 9 checks passed
@bradleycamacho bradleycamacho deleted the serc20-best-practices branch November 8, 2024 01:20
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