Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

docs: improve deployment instructions #413

Merged
merged 5 commits into from
Oct 24, 2024
Merged

docs: improve deployment instructions #413

merged 5 commits into from
Oct 24, 2024

Conversation

lumtis
Copy link
Member

@lumtis lumtis commented Oct 24, 2024

Add more instructions in the readme specifically for the protocol contracts deployment

Summary by CodeRabbit

  • New Features

    • Enhanced README documentation for Version 2, improving clarity on deployment processes.
    • Added detailed instructions for deploying protocol contracts on ZetaChain and connected chains.
    • Introduced a section on "Deterministic deployments" for consistent contract deployment across EVM chains.
    • Added a new subsection titled "More detailed instructions" directing users to a comprehensive Deployment Guide.
  • Bug Fixes

    • Reformatted deployment commands for better clarity.
  • Documentation

    • Updated the README to include an "Important Notice" about ongoing development for V2.
    • Streamlined headings, including renaming sections for improved navigation.

Copy link
Contributor

coderabbitai bot commented Oct 24, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request includes updates to the documentation and deployment scripts for Version 2 (V2) of the smart contract architecture. Key changes involve renaming sections in the README files for clarity, restructuring deployment instructions, and updating salt values in deployment scripts for ERC20Custody and GatewayEVM contracts. A file containing outdated documentation has been deleted, and new sections have been added to enhance user guidance on deploying contracts, particularly on ZetaChain.

Changes

File Path Change Summary
v2/README.md Renamed section from "Deploy using script" to "Deploy"; added "More detailed instructions" subsection.
v2/scripts/deploy/deterministic/DeployERC20Custody.s.sol Updated salt values for Create2 deployment of ERC20Custody and ERC1967Proxy.
v2/scripts/deploy/deterministic/DeployGatewayEVM.s.sol Updated salt values for Create2 deployment of GatewayEVM and ERC1967Proxy.
v2/scripts/deploy/deterministic/readme.md Deleted file that provided documentation for DeployGatewayEVM and UpgradeGatewayEVM scripts.
v2/scripts/deploy/readme.md Simplified header, repositioned notes, added detailed deployment instructions for ZetaChain contracts, and introduced a section on "Deterministic deployments."

Possibly related PRs

Suggested reviewers

  • fadeev
  • CharlieMc0
  • andresaiello
  • brewmaster012
  • skosito

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.

@lumtis lumtis linked an issue Oct 24, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.27%. Comparing base (abbfeea) to head (54c318c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #413   +/-   ##
=======================================
  Coverage   84.27%   84.27%           
=======================================
  Files           8        8           
  Lines         388      388           
  Branches      123      123           
=======================================
  Hits          327      327           
  Misses         61       61           

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (6)
v2/README.md (1)

44-48: Consider adding a security note about private key handling.

While the command structure is correct, it's recommended to add a security warning about not directly using private keys in command line arguments, as they may be logged in shell history.

Consider adding this note:

### Deploy

```shell
$ forge script script/<DeployScript>.s.sol:<DeployScript> --rpc-url <your_rpc_url> --private-key <your_private_key>

+> ⚠️ Security Note: Avoid using private keys directly in command line arguments. Consider using environment variables or a .env file instead.


<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

47-47: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

</blockquote></details>

</details>

</blockquote></details>
<details>
<summary>v2/scripts/deploy/deterministic/DeployGatewayEVM.s.sol (1)</summary><blockquote>

`18-19`: **Consider documenting the versioning strategy.**

The "-2" suffix in the salt values suggests a versioning strategy for deployments. This should be documented to maintain consistency across future updates.

Consider adding a comment explaining the versioning strategy:

```diff
+        // Salt values include version suffix for deployment iteration tracking
         bytes32 implSalt = keccak256("GatewayEVM-2");
         bytes32 proxySalt = keccak256("GatewayEVMProxy-2");
v2/scripts/deploy/deterministic/DeployERC20Custody.s.sol (1)

17-18: Document the new deterministic addresses.

Since the salt values determine the final contract addresses, it would be helpful to document the expected addresses for different networks.

Consider adding a comment above these lines:

+        // Salt values for deterministic deployment v2
+        // Expected addresses (mainnet):
+        // Implementation: 0x...
+        // Proxy: 0x...
         bytes32 implSalt = keccak256("ERC20Custody-2");
         bytes32 proxySalt = keccak256("ERC20CustodyProxy-2");
v2/scripts/deploy/readme.md (3)

1-13: Enhance readability with grammar fixes and markdown improvements.

Please apply these refinements:

  • Line 11: Rephrase to "check .env.sample for an example of how it should look"
  • Line 7: Add language specifier to the code block
-```
+```bash
 forge script scripts/deploy/<Script>.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast 

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary><blockquote>

[grammar] ~11-~11: ‘Like’ cannot be used with the question word ‘how’ in this context.
Context: ...pts, check `.env.sample` for example on how it should look like. Currently, `.env.sample` is set with t...

(HOW_IT_SHOULD_BE)

</blockquote></details>
<details>
<summary>🪛 Markdownlint</summary><blockquote>

7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`60-80`: **Add context for blockscout verification and improve code block.**

The section is well-documented, but consider:
1. Adding a brief explanation of why blockscout verification is used instead of etherscan
2. Adding language specifier to the code block

```diff
-```
+```bash
 forge script scripts/deploy/deterministic/DeployGatewayZEVM.s.sol \
   --private-key <PRIVATE_KEY> \
   --rpc-url <RPC_URL> \
   --verify \
   --verifier blockscout \
   --verifier-url <VERIFIER_URL> \
   --chain-id <CHAIN_ID> \
   --broadcast

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary><blockquote>

[uncategorized] ~66-~66: Loose punctuation mark.
Context: ...v` file:  - `GATEWAY_ADMIN_ADDRESS_ZEVM`: address of the admin  - `WZETA`: wrappe...

(UNLIKELY_OPENING_PUNCTUATION)

</blockquote></details>
<details>
<summary>🪛 Markdownlint</summary><blockquote>

71-71: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`82-97`: **Improve markdown formatting and grammar.**

Please enhance this section with the following changes:
1. Format URLs as proper markdown links
2. Fix grammar by adding missing articles:
   - Line 85: "will be on the same address"
   - Line 87: "using the above technique"
3. Consider adding a note about the importance of salt values in create2 deployments

```diff
-Deployment scripts in `deterministic` uses create2 with Foundry (https://book.getfoundry.sh/tutorials/create2-tutorial)
+Deployment scripts in `deterministic` uses create2 with [Foundry](https://book.getfoundry.sh/tutorials/create2-tutorial)

-The contract can be upgraded with the following documentation: https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades
+The contract can be upgraded following the [OpenZeppelin Foundry Upgrades documentation](https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~85-~85: You might be missing the article “the” here.
Context: ... chain GatewayEVM contract will be on same address. Since UUPS proxy is used for ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~87-~87: You might be missing the article “the” here.
Context: ...n and ERC1967Proxy are deployed using above technique: - calculate expected addres...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🪛 Markdownlint

84-84: null
Bare URL used

(MD034, no-bare-urls)


93-93: null
Bare URL used

(MD034, no-bare-urls)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between abbfeea and eeb58c8.

📒 Files selected for processing (5)
  • v2/README.md (1 hunks)
  • v2/scripts/deploy/deterministic/DeployERC20Custody.s.sol (1 hunks)
  • v2/scripts/deploy/deterministic/DeployGatewayEVM.s.sol (1 hunks)
  • v2/scripts/deploy/deterministic/readme.md (0 hunks)
  • v2/scripts/deploy/readme.md (1 hunks)
💤 Files with no reviewable changes (1)
  • v2/scripts/deploy/deterministic/readme.md
🧰 Additional context used
🪛 Markdownlint
v2/README.md

50-50: Expected: h4; Actual: h5
Heading levels should only increment by one level at a time

(MD001, heading-increment)


47-47: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

v2/scripts/deploy/readme.md

84-84: null
Bare URL used

(MD034, no-bare-urls)


93-93: null
Bare URL used

(MD034, no-bare-urls)


19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


41-41: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


50-50: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


71-71: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🪛 LanguageTool
v2/scripts/deploy/readme.md

[grammar] ~11-~11: ‘Like’ cannot be used with the question word ‘how’ in this context.
Context: ...pts, check .env.sample for example on how it should look like. Currently, .env.sample is set with t...

(HOW_IT_SHOULD_BE)


[grammar] ~17-~17: There may an error in the verb form ‘be deploy’.
Context: ...ewayEVM and ERC20Custody contracts must be deploy to setup a new environment on a connect...

(MD_BE_NON_VBP)


[grammar] ~17-~17: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...RC20Custody contracts must be deploy to setup a new environment on a connected chains...

(NOUN_VERB_CONFUSION)


[grammar] ~17-~17: The plural noun “chains” cannot be used with the article “a”. Did you mean “a connected chain” or “connected chains”?
Context: ...be deploy to setup a new environment on a connected chains. GatewayEVM The following environ...

(A_NNS)


[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...set in the .env file: - TSS_ADDRESS: address of the TSS used on the network ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~45-~45: Loose punctuation mark.
Context: ...et: - ERC20_CUSTODY_ADMIN_ADDRESS_EVM: address of the admin - `GATEWAY_PROXY_E...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~46-~46: You might be missing the article “the” here.
Context: ... proxy gateway contract deployed in previous step Once setup, the contract can be d...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~66-~66: Loose punctuation mark.
Context: ...vfile: -GATEWAY_ADMIN_ADDRESS_ZEVM: address of the admin - WZETA`: wrappe...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~85-~85: You might be missing the article “the” here.
Context: ... chain GatewayEVM contract will be on same address. Since UUPS proxy is used for ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~87-~87: You might be missing the article “the” here.
Context: ...n and ERC1967Proxy are deployed using above technique: - calculate expected addres...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🔇 Additional comments (5)
v2/README.md (1)

44-55: Documentation improvements look good!

The changes effectively improve the deployment instructions by:

  • Simplifying the main deployment section
  • Adding clear references to detailed documentation
  • Maintaining a good balance between concise overview and detailed guidance

The structure allows users to quickly find basic deployment commands while providing access to comprehensive instructions when needed.

🧰 Tools
🪛 Markdownlint

50-50: Expected: h4; Actual: h5
Heading levels should only increment by one level at a time

(MD001, heading-increment)


47-47: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

v2/scripts/deploy/deterministic/DeployGatewayEVM.s.sol (1)

18-19: Verify the impact of salt changes on deployment addresses.

The salt modifications will generate new deterministic addresses for both the implementation and proxy contracts. This is important for deployment coordination and integration points.

Let's verify the existing deployments and compute the new addresses:

Consider:

  1. Document the new deterministic addresses in deployment documentation
  2. Plan for a migration strategy if existing contracts interact with the current deployment
  3. Update integration tests to use the new addresses
v2/scripts/deploy/deterministic/DeployERC20Custody.s.sol (2)

Line range hint 1-58: Implementation includes robust safety checks.

The script follows deployment best practices with comprehensive validation:

  • Pre-computes expected addresses
  • Validates successful deployments
  • Verifies address matches
  • Confirms initialization parameters

17-18: Verify the impact of salt value changes on existing deployments.

The salt values have been updated with a "-2" suffix, which will generate new deterministic addresses for both the implementation and proxy contracts. This change suggests a new deployment version.

Let's verify if these contracts are already deployed with the old salt values:

Consider documenting:

  1. The reason for changing the salt values
  2. The implications for existing deployments
  3. Migration steps if needed
✅ Verification successful

Let me gather more specific information about the ERC20Custody deployments and salt usage.

I'm looking for:

  1. Any existing deployment configurations
  2. Context around the deployment scripts
  3. Documentation mentioning the ERC20Custody deployments

This will help us understand if this is a new deployment or an upgrade to existing ones, and what impact the salt changes might have.


Based on the gathered information, I can now provide a final response:

Salt changes are part of a new deployment version and won't affect existing contracts

The changes to the salt values are intentional and documented in the deployment script. From the context:

  1. The deployment script is part of v2 contracts, while v1 has its own separate implementation
  2. The -2 suffix in the new salt values clearly indicates this is a new version deployment
  3. The deployment documentation in v2/scripts/deploy/readme.md shows this is part of the standard deployment process for setting up new environments

The salt changes won't affect existing deployments as Create2 deployments are immutable - once deployed with a specific salt, they cannot be overwritten. The new salt values will simply deploy to different addresses, allowing for a clean v2 deployment.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if there are any references to the old salt values in the codebase
# or existing deployments that might be affected by this change.

# Test 1: Search for old salt values in deployment artifacts or addresses
rg -l "ERC20Custody[^\-]" --type yaml --type json

# Test 2: Search for any documentation or scripts referencing the old addresses
rg -l "0x[a-fA-F0-9]{40}" --type md --type txt

Length of output: 502


Script:

#!/bin/bash
# Search for any existing deployment addresses or configurations related to ERC20Custody
rg -l "ERC20Custody" --type-add 'config:*.{json,yaml,toml}' --type config

# Look for deployment scripts or tests that might reference ERC20Custody
rg "ERC20Custody" -A 5 -B 5 ./v2/scripts/deploy/

# Check for any existing deployment documentation
fd -e md | xargs rg "ERC20Custody" -A 3 -B 3

Length of output: 20525

v2/scripts/deploy/readme.md (1)

15-58: Fix grammar issues and enhance deployment instructions.

Please apply these corrections:

  • Line 17: Change "must be deploy" to "must be deployed"
  • Line 17: Change "setup" to "set up" (verb form)
  • Line 17: Fix "a connected chains" to "connected chains"
  • Line 46: Add "the" before "previous step"

Additionally, consider adding validation notes for the environment variables to help users verify their values before deployment.

🧰 Tools
🪛 LanguageTool

[grammar] ~17-~17: There may an error in the verb form ‘be deploy’.
Context: ...ewayEVM and ERC20Custody contracts must be deploy to setup a new environment on a connect...

(MD_BE_NON_VBP)


[grammar] ~17-~17: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...RC20Custody contracts must be deploy to setup a new environment on a connected chains...

(NOUN_VERB_CONFUSION)


[grammar] ~17-~17: The plural noun “chains” cannot be used with the article “a”. Did you mean “a connected chain” or “connected chains”?
Context: ...be deploy to setup a new environment on a connected chains. GatewayEVM The following environ...

(A_NNS)


[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...set in the .env file: - TSS_ADDRESS: address of the TSS used on the network ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~45-~45: Loose punctuation mark.
Context: ...et: - ERC20_CUSTODY_ADMIN_ADDRESS_EVM: address of the admin - `GATEWAY_PROXY_E...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~46-~46: You might be missing the article “the” here.
Context: ... proxy gateway contract deployed in previous step Once setup, the contract can be d...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🪛 Markdownlint

19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


41-41: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


50-50: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

v2/README.md Outdated Show resolved Hide resolved
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: 4

🧹 Outside diff range and nitpick comments (5)
v2/README.md (1)

44-47: Enhance command documentation with placeholder descriptions.

While the command structure is clear, consider adding descriptions for the placeholders to help users:

 ### Deploy
 
 ```shell
-$ forge script script/<DeployScript>.s.sol:<DeployScript> --rpc-url <your_rpc_url> --private-key <your_private_key>
+$ forge script script/<DeployScript>.s.sol:<DeployScript> --rpc-url <your_rpc_url> --private-key <your_private_key>
+
+# Where:
+# <DeployScript>: Name of the deployment script (e.g., DeployERC20Custody)
+# <your_rpc_url>: RPC endpoint URL for the target network
+# <your_private_key>: Private key for the deployer account (without 0x prefix)

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

47-47: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

</blockquote></details>

</details>

</blockquote></details>
<details>
<summary>v2/scripts/deploy/readme.md (4)</summary><blockquote>

`5-9`: **Add language specification to the code block.**

For better syntax highlighting and documentation consistency, specify the language for the code block.

```diff
-```
+```bash
 forge script scripts/deploy/<Script>.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast 

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`29-37`: **Add language specification to the deployment command block.**

For better syntax highlighting and documentation consistency, specify the language for the code block.

```diff
-```
+```bash
 forge script scripts/deploy/deterministic/DeployGatewayEVM.s.sol \
   --private-key <PRIVATE_KEY> \
   --rpc-url <RPC_URL> \
   --verify \
   --etherscan-api-key <ETHERSCAN_API_KEY> \
   --chain-id <CHAIN_ID> \
   --broadcast

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`71-80`: **Add language specification and clarify verification details.**

The code block needs language specification, and the verification parameters could use more explanation.

```diff
-```
+```bash
 forge script scripts/deploy/deterministic/DeployGatewayZEVM.s.sol \
   --private-key <PRIVATE_KEY> \
   --rpc-url <RPC_URL> \
   --verify \
   --verifier blockscout \
   --verifier-url <VERIFIER_URL> \
   --chain-id <CHAIN_ID> \
   --broadcast

Consider adding a note explaining the expected format for `<VERIFIER_URL>` and why blockscout is used specifically for ZetaChain.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

71-71: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`1-107`: **Consider adding troubleshooting section and environment setup checklist.**

The deployment instructions are well-structured, but could be enhanced with:
1. A troubleshooting section covering common deployment issues and their solutions
2. A pre-deployment checklist to ensure all prerequisites are met
3. Examples of expected output for successful deployments

This would make the documentation more robust and user-friendly.

Would you like me to help draft these additional sections?

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary><blockquote>

[grammar] ~11-~11: ‘Like’ cannot be used with the question word ‘how’ in this context.
Context: ...pts, check `.env.sample` for example on how it should look like. Currently, `.env.sample` is set with t...

(HOW_IT_SHOULD_BE)

---

[grammar] ~17-~17: There may an error in the verb form ‘be deploy’.
Context: ...ewayEVM and ERC20Custody contracts must be deploy to setup a new environment on a connect...

(MD_BE_NON_VBP)

---

[grammar] ~17-~17: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...RC20Custody contracts must be deploy to setup a new environment on a connected chains...

(NOUN_VERB_CONFUSION)

---

[grammar] ~17-~17: The plural noun “chains” cannot be used with the article “a”. Did you mean “a connected chain” or “connected chains”?
Context: ...be deploy to setup a new environment on a connected chains.  **GatewayEVM**  The following environ...

(A_NNS)

---

[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...set in the `.env` file:  - `TSS_ADDRESS`: address of the TSS used on the network ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~45-~45: Loose punctuation mark.
Context: ...et:  - `ERC20_CUSTODY_ADMIN_ADDRESS_EVM`: address of the admin - `GATEWAY_PROXY_E...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~46-~46: You might be missing the article “the” here.
Context: ... **proxy** gateway contract deployed in previous step  Once setup, the contract can be d...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

---

[uncategorized] ~66-~66: Loose punctuation mark.
Context: ...v` file:  - `GATEWAY_ADMIN_ADDRESS_ZEVM`: address of the admin  - `WZETA`: wrappe...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~85-~85: Possible missing comma found.
Context: ...ntracts. This ensures that on every EVM chain `GatewayEVM` contract will be on same a...

(AI_HYDRA_LEO_MISSING_COMMA)

---

[uncategorized] ~85-~85: You might be missing the article “the” here.
Context: ... chain `GatewayEVM` contract will be on same address.  Since UUPS proxy is used for ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

---

[uncategorized] ~87-~87: You might be missing the article “the” here.
Context: ...n and `ERC1967Proxy` are deployed using above technique:  - calculate expected addres...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

---

[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...`deterministic/DeployERC20Custody.s.sol`: deploy the ERC20 custody contract on a ...

(UNLIKELY_OPENING_PUNCTUATION)

</blockquote></details>
<details>
<summary>🪛 Markdownlint</summary><blockquote>

84-84: null
Bare URL used

(MD034, no-bare-urls)

---

93-93: null
Bare URL used

(MD034, no-bare-urls)

---

19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

41-41: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

50-50: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

71-71: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**

<details>
<summary>📥 Commits</summary>

Files that changed from the base of the PR and between eeb58c8af348ea29a3b7d9979b2cd6852c4ee67f and 3b31125ebc0e837435884924c47edaecd5acbd85.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* v2/README.md (1 hunks)
* v2/scripts/deploy/readme.md (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

<details>
<summary>v2/README.md</summary><blockquote>

50-50: Expected: h4; Actual: h5
Heading levels should only increment by one level at a time

(MD001, heading-increment)

---

47-47: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

</blockquote></details>
<details>
<summary>v2/scripts/deploy/readme.md</summary><blockquote>

84-84: null
Bare URL used

(MD034, no-bare-urls)

---

93-93: null
Bare URL used

(MD034, no-bare-urls)

---

19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

41-41: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

50-50: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

71-71: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</blockquote></details>
<details>
<summary>🪛 LanguageTool</summary><blockquote>

<details>
<summary>v2/scripts/deploy/readme.md</summary><blockquote>

[grammar] ~11-~11: ‘Like’ cannot be used with the question word ‘how’ in this context.
Context: ...pts, check `.env.sample` for example on how it should look like. Currently, `.env.sample` is set with t...

(HOW_IT_SHOULD_BE)

---

[grammar] ~17-~17: There may an error in the verb form ‘be deploy’.
Context: ...ewayEVM and ERC20Custody contracts must be deploy to setup a new environment on a connect...

(MD_BE_NON_VBP)

---

[grammar] ~17-~17: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...RC20Custody contracts must be deploy to setup a new environment on a connected chains...

(NOUN_VERB_CONFUSION)

---

[grammar] ~17-~17: The plural noun “chains” cannot be used with the article “a”. Did you mean “a connected chain” or “connected chains”?
Context: ...be deploy to setup a new environment on a connected chains.  **GatewayEVM**  The following environ...

(A_NNS)

---

[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...set in the `.env` file:  - `TSS_ADDRESS`: address of the TSS used on the network ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~45-~45: Loose punctuation mark.
Context: ...et:  - `ERC20_CUSTODY_ADMIN_ADDRESS_EVM`: address of the admin - `GATEWAY_PROXY_E...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~46-~46: You might be missing the article “the” here.
Context: ... **proxy** gateway contract deployed in previous step  Once setup, the contract can be d...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

---

[uncategorized] ~66-~66: Loose punctuation mark.
Context: ...v` file:  - `GATEWAY_ADMIN_ADDRESS_ZEVM`: address of the admin  - `WZETA`: wrappe...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~85-~85: Possible missing comma found.
Context: ...ntracts. This ensures that on every EVM chain `GatewayEVM` contract will be on same a...

(AI_HYDRA_LEO_MISSING_COMMA)

---

[uncategorized] ~85-~85: You might be missing the article “the” here.
Context: ... chain `GatewayEVM` contract will be on same address.  Since UUPS proxy is used for ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

---

[uncategorized] ~87-~87: You might be missing the article “the” here.
Context: ...n and `ERC1967Proxy` are deployed using above technique:  - calculate expected addres...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

---

[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...`deterministic/DeployERC20Custody.s.sol`: deploy the ERC20 custody contract on a ...

(UNLIKELY_OPENING_PUNCTUATION)

</blockquote></details>

</blockquote></details>

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>v2/README.md (1)</summary><blockquote>

Line range hint `1-5`: **LGTM! Clear development status notice.**

The notice effectively communicates the development status and provides a helpful link to get started with V2.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

50-50: Expected: h4; Actual: h5
Heading levels should only increment by one level at a time

(MD001, heading-increment)

---

41-41: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

---

47-47: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

</blockquote></details>

</details>

</blockquote></details>
<details>
<summary>v2/scripts/deploy/readme.md (1)</summary><blockquote>

`99-107`: **LGTM! Clear and comprehensive list of deployment scripts.**

The list provides a good overview of all available deployment scripts with clear descriptions of their purposes.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary><blockquote>

[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...`deterministic/DeployERC20Custody.s.sol`: deploy the ERC20 custody contract on a ...

(UNLIKELY_OPENING_PUNCTUATION)

</blockquote></details>

</details>

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

v2/README.md Show resolved Hide resolved
v2/scripts/deploy/readme.md Outdated Show resolved Hide resolved
v2/scripts/deploy/readme.md Outdated Show resolved Hide resolved
Copy link
Contributor

@fbac fbac left a comment

Choose a reason for hiding this comment

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

LGTM, added a few minor comments.

v2/scripts/deploy/readme.md Outdated Show resolved Hide resolved
v2/scripts/deploy/readme.md Outdated Show resolved Hide resolved
v2/scripts/deploy/readme.md Outdated Show resolved Hide resolved
v2/scripts/deploy/readme.md Outdated Show resolved Hide resolved
v2/scripts/deploy/readme.md Outdated Show resolved Hide resolved
Co-authored-by: Francisco de Borja Aranda Castillejo <[email protected]>
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 (7)
v2/scripts/deploy/readme.md (7)

3-3: Fix grammar in introduction.

The introduction could be more precise.

-This directory contains script to deploy the protocol contracts on ZetaChain and connected chains.
+This directory contains scripts to deploy the protocol contracts on ZetaChain and connected chains.

7-9: Add language specifier to code block.

For better syntax highlighting and documentation consistency, specify the language for the code block.

-```
+```shell
 forge script scripts/deploy/<Script>.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast 

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`19-19`: **Use proper markdown headings.**

Instead of using bold text for headers, use proper markdown heading syntax for better document structure.

```diff
-**GatewayEVM**
+### GatewayEVM

-**ERC20Custody**
+### ERC20Custody

Also applies to: 41-41

🧰 Tools
🪛 Markdownlint

19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


29-37: Add language specifier to code block.

For better syntax highlighting and documentation consistency, specify the language for the code block.

-```
+```shell
 forge script scripts/deploy/deterministic/DeployGatewayEVM.s.sol \
   --private-key <PRIVATE_KEY> \
   --rpc-url <RPC_URL> \
   --verify \
   --etherscan-api-key <ETHERSCAN_API_KEY> \
   --chain-id <CHAIN_ID> \
   --broadcast

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`71-80`: **Add language specifier to code block.**

For better syntax highlighting and documentation consistency, specify the language for the code block.

```diff
-```
+```shell
 forge script scripts/deploy/deterministic/DeployGatewayZEVM.s.sol \
   --private-key <PRIVATE_KEY> \
   --rpc-url <RPC_URL> \
   --verify \
   --verifier blockscout \
   --verifier-url <VERIFIER_URL> \
   --chain-id <CHAIN_ID> \
   --broadcast

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

71-71: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`82-97`: **Add security considerations for deterministic deployments.**

While the deterministic deployment process is well explained, it would be helpful to add security considerations regarding the use of create2 and UUPS proxy pattern. Consider adding:
- The importance of carefully managing the salt values
- Security implications of proxy upgrades
- Access control considerations for the upgrade process

Would you like me to help draft a security considerations section?

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

84-84: null
Bare URL used

(MD034, no-bare-urls)

---

93-93: null
Bare URL used

(MD034, no-bare-urls)

</blockquote></details>

</details>

---

`101-107`: **Consider grouping scripts by functionality.**

The script listing would be more organized if grouped by functionality:

1. Core Protocol Deployment
   - DeployERC20Custody.s.sol
   - DeployGatewayEVM.s.sol
   - DeployGatewayZEVM.s.sol

2. Upgrade Scripts
   - UpgradeGatewayEVM.s.sol

3. Test & Development
   - TestERC20.s.sol
   - DeployZRC20.s.sol
   - ZetaConnectorNonNative.s.sol

Would you like me to help restructure this section?

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary><blockquote>

[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...`deterministic/DeployERC20Custody.s.sol`: deploy the ERC20 custody contract on a ...

(UNLIKELY_OPENING_PUNCTUATION)

</blockquote></details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: .coderabbit.yaml**
**Review profile: CHILL**

<details>
<summary>📥 Commits</summary>

Files that changed from the base of the PR and between 3b31125ebc0e837435884924c47edaecd5acbd85 and 2fbe3ae45ca6c077acfd09cf9837bfc3178c274c.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* v2/scripts/deploy/readme.md (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 LanguageTool</summary><blockquote>

<details>
<summary>v2/scripts/deploy/readme.md</summary><blockquote>

[grammar] ~11-~11: ‘Like’ cannot be used with the question word ‘how’ in this context.
Context: ...pts, check `.env.sample` for example on how it should look like. Currently, `.env.sample` is set with t...

(HOW_IT_SHOULD_BE)

---

[grammar] ~17-~17: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...20Custody contracts must be deployed to setup a new environment on a connected chain....

(NOUN_VERB_CONFUSION)

---

[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...set in the `.env` file:  - `TSS_ADDRESS`: address of the TSS used on the network ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~45-~45: Loose punctuation mark.
Context: ...et:  - `ERC20_CUSTODY_ADMIN_ADDRESS_EVM`: address of the admin - `GATEWAY_PROXY_E...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~66-~66: Loose punctuation mark.
Context: ...v` file:  - `GATEWAY_ADMIN_ADDRESS_ZEVM`: address of the admin  - `WZETA`: wrappe...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...`deterministic/DeployERC20Custody.s.sol`: deploy the ERC20 custody contract on a ...

(UNLIKELY_OPENING_PUNCTUATION)

</blockquote></details>

</blockquote></details>
<details>
<summary>🪛 Markdownlint</summary><blockquote>

<details>
<summary>v2/scripts/deploy/readme.md</summary><blockquote>

84-84: null
Bare URL used

(MD034, no-bare-urls)

---

93-93: null
Bare URL used

(MD034, no-bare-urls)

---

19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

41-41: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

---

7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

50-50: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

---

71-71: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</blockquote></details>

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

v2/scripts/deploy/readme.md Outdated Show resolved Hide resolved
v2/scripts/deploy/readme.md Outdated Show resolved Hide resolved
v2/scripts/deploy/readme.md Show resolved Hide resolved
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

🧹 Outside diff range and nitpick comments (5)
v2/scripts/deploy/readme.md (5)

5-9: Add language specification to code block.

The code block should specify the language for better syntax highlighting.

-```
+```shell
 forge script scripts/deploy/<Script>.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast 

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`29-37`: **Add language specification to deployment command blocks.**

All deployment command blocks should specify the shell language for better syntax highlighting.

```diff
-```
+```shell

Also applies to: 50-58, 71-80

🧰 Tools
🪛 Markdownlint

29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


39-39: Clarify contract verification importance.

While verification is technically optional for deployment, it's a crucial step for contract transparency and security. Consider adding a note about its importance.

-Note: `verify` and `etherscan-api-key` options are optional for the contract deployment itself.
+Note: While `verify` and `etherscan-api-key` options are not required for deployment, contract verification is strongly recommended for transparency and security purposes.

101-107: Enhance script descriptions for clarity.

Some script descriptions could be more detailed to better guide users.

-- `deterministic/UpgradeGatewayEVM.s.sol`: upgrade the GatewayEVM contract to a test contract implementation, used for test purposes only
-- `deterministic/ZetaConnectorNonNative.s.sol`: deploy the ZETA connector contract on a connected chain, currently not used
+- `deterministic/UpgradeGatewayEVM.s.sol`: [TEST ONLY] A script to test the upgrade mechanism of the GatewayEVM contract
+- `deterministic/ZetaConnectorNonNative.s.sol`: [DEPRECATED] A script to deploy the ZETA connector contract (no longer used in production)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...deterministic/DeployERC20Custody.s.sol: deploy the ERC20 custody contract on a ...

(UNLIKELY_OPENING_PUNCTUATION)


19-19: Use proper markdown headings instead of bold text.

For better document structure and navigation, use proper heading syntax.

-**GatewayEVM**
+### GatewayEVM

-**ERC20Custody**
+### ERC20Custody

Also applies to: 41-41

🧰 Tools
🪛 Markdownlint

19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 2fbe3ae and 999fa27.

📒 Files selected for processing (1)
  • v2/scripts/deploy/readme.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
v2/scripts/deploy/readme.md

[grammar] ~11-~11: ‘Like’ cannot be used with the question word ‘how’ in this context.
Context: ...pts, check .env.sample for example on how it should look like. Currently, .env.sample is set with t...

(HOW_IT_SHOULD_BE)


[grammar] ~17-~17: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...20Custody contracts must be deployed to setup a new environment on a connected chain....

(NOUN_VERB_CONFUSION)


[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...set in the .env file: - TSS_ADDRESS: address of the TSS used on the network ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~45-~45: Loose punctuation mark.
Context: ...et: - ERC20_CUSTODY_ADMIN_ADDRESS_EVM: address of the admin - `GATEWAY_PROXY_E...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~46-~46: You might be missing the article “the” here.
Context: ... proxy gateway contract deployed in previous step Once setup, the contract can be d...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~66-~66: Loose punctuation mark.
Context: ...vfile: -GATEWAY_ADMIN_ADDRESS_ZEVM: address of the admin - WZETA`: wrappe...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~87-~87: You might be missing the article “the” here.
Context: ...n and ERC1967Proxy are deployed using above technique: - calculate expected addres...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...deterministic/DeployERC20Custody.s.sol: deploy the ERC20 custody contract on a ...

(UNLIKELY_OPENING_PUNCTUATION)

🪛 Markdownlint
v2/scripts/deploy/readme.md

84-84: null
Bare URL used

(MD034, no-bare-urls)


93-93: null
Bare URL used

(MD034, no-bare-urls)


19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


41-41: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


50-50: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


71-71: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

v2/scripts/deploy/readme.md Show resolved Hide resolved
v2/scripts/deploy/readme.md Show resolved Hide resolved
v2/scripts/deploy/readme.md Show resolved Hide resolved
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 (7)
v2/scripts/deploy/readme.md (7)

3-3: Fix typo in introduction.

-This directory contains script to deploy the protocol contracts on ZetaChain and connected chains.
+This directory contains scripts to deploy the protocol contracts on ZetaChain and connected chains.

7-9: Add language specification to code block.

-```
+```shell
 forge script scripts/deploy/<Script>.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast 

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</blockquote></details>

</details>

---

`17-17`: **Fix verb usage.**

```diff
-The GatewayEVM and ERC20Custody contracts must be deployed to setup a new environment on a connected chain.
+The GatewayEVM and ERC20Custody contracts must be deployed to set up a new environment on a connected chain.
🧰 Tools
🪛 LanguageTool

[grammar] ~17-~17: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...20Custody contracts must be deployed to setup a new environment on a connected chain....

(NOUN_VERB_CONFUSION)


19-19: Use proper markdown heading syntax.

-**GatewayEVM**
+### GatewayEVM

-**ERC20Custody**
+### ERC20Custody

Also applies to: 46-46

🧰 Tools
🪛 Markdownlint

19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


29-37: Add language specification to code blocks.

Add shell language specification to the code blocks to enable proper syntax highlighting:

-```
+```shell

Also applies to: 55-63

🧰 Tools
🪛 Markdownlint

29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


76-85: Add language specification to code block.

Add shell language specification to the code block:

-```
+```shell
🧰 Tools
🪛 Markdownlint

76-76: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


89-90: Improve documentation formatting and clarity.

-Deployment scripts in `deterministic` uses create2 with Foundry (https://book.getfoundry.sh/tutorials/create2-tutorial) to perform deterministic deployment of contracts.
+Deployment scripts in `deterministic` use create2 with Foundry ([Create2 Tutorial](https://book.getfoundry.sh/tutorials/create2-tutorial)) to perform deterministic deployment of contracts.

-The contract can be upgraded with the following documentation: https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades. It requires:
+The contract can be upgraded following the [OpenZeppelin Foundry Upgrades documentation](https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades). The upgrade process requires:

-- deploy new implementation (doesn't need to be deterministic since proxy address doesn't change)
-- use plugin to upgrade proxy
+- Deploy a new implementation contract (doesn't need to be deterministic since the proxy address remains unchanged)
+- Use the OpenZeppelin plugin to upgrade the proxy to point to the new implementation

Also applies to: 98-101

🧰 Tools
🪛 Markdownlint

89-89: null
Bare URL used

(MD034, no-bare-urls)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 999fa27 and 54c318c.

📒 Files selected for processing (1)
  • v2/scripts/deploy/readme.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
v2/scripts/deploy/readme.md

[grammar] ~11-~11: ‘Like’ cannot be used with the question word ‘how’ in this context.
Context: ...pts, check .env.sample for example on how it should look like. Currently, .env.sample is set with t...

(HOW_IT_SHOULD_BE)


[grammar] ~17-~17: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...20Custody contracts must be deployed to setup a new environment on a connected chain....

(NOUN_VERB_CONFUSION)


[uncategorized] ~23-~23: Loose punctuation mark.
Context: ...set in the .env file: - TSS_ADDRESS: address of the TSS used on the network ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~50-~50: Loose punctuation mark.
Context: ...et: - ERC20_CUSTODY_ADMIN_ADDRESS_EVM: address of the admin - `GATEWAY_PROXY_E...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~71-~71: Loose punctuation mark.
Context: ...vfile: -GATEWAY_ADMIN_ADDRESS_ZEVM: address of the admin - WZETA`: wrappe...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~106-~106: Loose punctuation mark.
Context: ...deterministic/DeployERC20Custody.s.sol: deploy the ERC20 custody contract on a ...

(UNLIKELY_OPENING_PUNCTUATION)

🪛 Markdownlint
v2/scripts/deploy/readme.md

89-89: null
Bare URL used

(MD034, no-bare-urls)


98-98: null
Bare URL used

(MD034, no-bare-urls)


19-19: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


46-46: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


7-7: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


29-29: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


40-40: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


55-55: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


76-76: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

@lumtis lumtis merged commit ec0a197 into main Oct 24, 2024
11 checks passed
@lumtis lumtis deleted the docs/deploy-improvement branch October 24, 2024 14:17
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.

Add more description for deployment process
4 participants