-
Notifications
You must be signed in to change notification settings - Fork 59
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
localnet #443
Conversation
WalkthroughWalkthroughThe changes introduce a new section titled "localnet" in the tutorial documentation, providing developers with guidance on setting up a local development environment for universal applications. This includes detailed instructions for deploying contracts and simulating interactions with ZetaChain and EVM gateways. Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Localnet is still WIP (for example, reverts fail: zeta-chain/localnet#23), but it's still better than nothing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range, codebase verification and nitpick comments (2)
src/pages/developers/tutorials/localnet.mdx (2)
34-34
: Insert a comma for improved readability.Consider adding a comma after "set up" for better readability.
Use this diff to improve the sentence:
deployed. After the localnet is set up you will see a list of protocol contract + deployed. After the localnet is set up, you will see a list of protocol contract
Tools
LanguageTool
[uncategorized] ~34-~34: Possible missing comma found.
Context: ...ing deployed. After the localnet is set up you will see a list of protocol contrac...(AI_HYDRA_LEO_MISSING_COMMA)
75-75
: Insert a comma for improved readability.Consider adding a comma after "local testnet" for better readability.
Use this diff to improve the sentence:
Even though both contracts are deployed on the same local testnet we will think + Even though both contracts are deployed on the same local testnet, we will think
Tools
LanguageTool
[typographical] ~75-~75: Consider inserting a comma for improved readability.
Context: ...s are deployed on the same local testnet we will think of Hello as running on ZetaC...(MISSING_COMMAS)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- src/pages/developers/tutorials/_meta.json (1 hunks)
- src/pages/developers/tutorials/localnet.mdx (1 hunks)
Additional context used
LanguageTool
src/pages/developers/tutorials/localnet.mdx
[duplication] ~12-~12: Possible typo: you repeated a word
Context: ...ment of ZetaChain by observing events and and relaying the contract calls between EVM...(ENGLISH_WORD_REPEAT_RULE)
[uncategorized] ~34-~34: Possible missing comma found.
Context: ...ing deployed. After the localnet is set up you will see a list of protocol contrac...(AI_HYDRA_LEO_MISSING_COMMA)
[typographical] ~75-~75: Consider inserting a comma for improved readability.
Context: ...s are deployed on the same local testnet we will think of Hello as running on ZetaC...(MISSING_COMMAS)
[duplication] ~98-~98: Possible typo: you repeated a word
Context: ...d' event emitted ``` Localnet picks up the the "Deposited" event and calls the ZetaCha...(ENGLISH_WORD_REPEAT_RULE)
[duplication] ~162-~162: Possible typo: you repeated a word
Context: ...d' event emitted ``` Localnet picks up the the "Called" event and calls the EVM gatewa...(ENGLISH_WORD_REPEAT_RULE)
Additional comments not posted (1)
src/pages/developers/tutorials/_meta.json (1)
12-16
: New entry for "localnet" looks good.The addition of the "localnet" section is consistent with the existing structure and enhances the documentation by providing guidance on local development practices.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (5)
src/pages/developers/tutorials/localnet.mdx (5)
10-10
: Insert missing comma for improved readability.Add a comma after "blockchain" to improve readability.
- and running on the same local blockchain Simulates the real-world testnet + and running on the same local blockchain, Simulates the real-world testnet
23-23
: Insert missing comma for improved readability.Add a comma after "localnet" to improve readability.
- update localnet just run `yarn add --dev @zetachain/localnet`. The template + update localnet, just run `yarn add --dev @zetachain/localnet`. The templateTools
LanguageTool
[uncategorized] ~23-~23: Possible missing comma found.
Context: ...ocalnetpackage. If you need to update localnet just run
yarn add --dev @zetachain/loc...(AI_HYDRA_LEO_MISSING_COMMA)
75-75
: Insert missing comma for improved readability.Add a comma after "testnet" to improve readability.
- Even though both contracts are deployed on the same local testnet we will think + Even though both contracts are deployed on the same local testnet, we will thinkTools
LanguageTool
[typographical] ~75-~75: Consider inserting a comma for improved readability.
Context: ...s are deployed on the same local testnet we will think of Hello as running on ZetaC...(MISSING_COMMAS)
134-134
: Insert missing comma for improved readability.Add a comma after "app" to improve readability.
- Now instead of emitting an event from a universal app we see an error caused by + Now instead of emitting an event from a universal app, we see an error caused byTools
LanguageTool
[uncategorized] ~134-~134: Possible missing comma found.
Context: ...d of emitting an event from a universal app we see an error caused by the `revert()...(AI_HYDRA_LEO_MISSING_COMMA)
162-162
: Correct repeated word "the".There is a repeated word "the" in the sentence. Consider removing one of them for clarity.
- Localnet picks up the the "Called" event and calls the EVM gateway `execute` + Localnet picks up the "Called" event and calls the EVM gateway `execute`
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/pages/developers/tutorials/localnet.mdx (1 hunks)
Additional context used
LanguageTool
src/pages/developers/tutorials/localnet.mdx
[uncategorized] ~23-~23: Possible missing comma found.
Context: ...ocalnetpackage. If you need to update localnet just run
yarn add --dev @zetachain/loc...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~34-~34: Possible missing comma found.
Context: ...ing deployed. After the localnet is set up you will see a list of protocol contrac...(AI_HYDRA_LEO_MISSING_COMMA)
[typographical] ~75-~75: Consider inserting a comma for improved readability.
Context: ...s are deployed on the same local testnet we will think of Hello as running on ZetaC...(MISSING_COMMAS)
[uncategorized] ~134-~134: Possible missing comma found.
Context: ...d of emitting an event from a universal app we see an error caused by the `revert()...(AI_HYDRA_LEO_MISSING_COMMA)
Additional comments not posted (1)
src/pages/developers/tutorials/localnet.mdx (1)
25-50
: LGTM!The instructions for starting the localnet and listing the contract addresses are clear and correctly formatted.
Tools
LanguageTool
[uncategorized] ~34-~34: Possible missing comma found.
Context: ...ing deployed. After the localnet is set up you will see a list of protocol contrac...(AI_HYDRA_LEO_MISSING_COMMA)
@bbbeeeee @brewmaster012 @zeta-chain/fullstack please, review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (4)
src/pages/developers/tutorials/localnet.mdx (4)
1-13
: Improve readability with minor grammatical changes.Consider the following changes for better readability:
- Localnet is a local development environment that simplifies the development of universal apps. + Localnet is a local development environment that simplifies the development of universal applications. - Localnet: + Localnet performs the following actions: - Starts an [Anvil](https://book.getfoundry.sh/anvil/) local testnet node + - Starts an [Anvil](https://book.getfoundry.sh/anvil/) local testnet node. - Deploys [protocol contracts](https://github.com/zeta-chain/protocol-contracts/tree/main/v2) on the local testnet node. Both [EVM gateway and ZetaChain gateway](/developers/evm/gateway/) are deployed and running on the same local blockchain Simulates the real-world testnet environment of ZetaChain by observing events and relaying the contract calls between EVM gateway and ZetaChain gateway + - Deploys [protocol contracts](https://github.com/zeta-chain/protocol-contracts/tree/main/v2) on the local testnet node. Both the [EVM gateway and ZetaChain gateway](/developers/evm/gateway/) are deployed and running on the same local blockchain. Simulates the real-world testnet environment of ZetaChain by observing events and relaying the contract calls between the EVM gateway and ZetaChain gateway.
23-25
: Improve readability with minor grammatical changes.Consider the following change for better readability:
- If you need to update localnet just run `yarn add --dev @zetachain/localnet`. + If you need to update Localnet, just run `yarn add --dev @zetachain/localnet`.Tools
LanguageTool
[uncategorized] ~24-~24: Possible missing comma found.
Context: ...ocalnetpackage. If you need to update localnet just run
yarn add --dev @zetachain/loc...(AI_HYDRA_LEO_MISSING_COMMA)
33-51
: Improve readability with minor grammatical changes.Consider the following change for better readability:
- After the localnet is set up you will see a list of protocol contract addresses: + After the localnet is set up, you will see a list of protocol contract addresses:Tools
LanguageTool
[uncategorized] ~35-~35: Possible missing comma found.
Context: ...ing deployed. After the localnet is set up you will see a list of protocol contrac...(AI_HYDRA_LEO_MISSING_COMMA)
76-79
: Improve readability with minor grammatical changes.Consider the following change for better readability:
- Even though both contracts are deployed on the same local testnet we will think of Hello as running on ZetaChain and Receiver as running on a generic EVM chain. + Even though both contracts are deployed on the same local testnet, we will think of Hello as running on ZetaChain and Receiver as running on a generic EVM chain.Tools
LanguageTool
[typographical] ~76-~76: Consider inserting a comma for improved readability.
Context: ...s are deployed on the same local testnet we will think of Hello as running on ZetaC...(MISSING_COMMAS)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/pages/developers/tutorials/localnet.mdx (1 hunks)
Additional context used
LanguageTool
src/pages/developers/tutorials/localnet.mdx
[uncategorized] ~24-~24: Possible missing comma found.
Context: ...ocalnetpackage. If you need to update localnet just run
yarn add --dev @zetachain/loc...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~35-~35: Possible missing comma found.
Context: ...ing deployed. After the localnet is set up you will see a list of protocol contrac...(AI_HYDRA_LEO_MISSING_COMMA)
[typographical] ~76-~76: Consider inserting a comma for improved readability.
Context: ...s are deployed on the same local testnet we will think of Hello as running on ZetaC...(MISSING_COMMAS)
Additional comments not posted (13)
src/pages/developers/tutorials/localnet.mdx (13)
15-21
: LGTM!The instructions for cloning the example contracts repo and installing dependencies are clear and correct.
27-31
: LGTM!The instructions for starting Localnet are clear and correct.
53-54
: LGTM!The instructions for keeping the terminal window open and opening a new terminal are clear and correct.
55-60
: LGTM!The instructions for compiling and deploying contracts are clear and correct.
62-74
: LGTM!The description of the deployed contract addresses is clear and correct.
81-88
: LGTM!The instructions for calling a universal app from EVM are clear and correct.
90-104
: LGTM!The description of the "Deposited" event and the subsequent actions is clear and correct.
106-110
: LGTM!The description of the
onCrossChainCall
execution and the emitted event is clear and correct.
112-121
: LGTM!The instructions for calling a universal app from EVM and forcing a revert are clear and correct.
123-140
: LGTM!The description of the "Deposited" event and the subsequent actions when forcing a revert is clear and correct.
142-146
: LGTM!The description of the
onRevert
function execution is clear and correct.
148-154
: LGTM!The instructions for calling a receiver contract from a universal app are clear and correct.
170-174
: LGTM!The description of the receiver contract emitting an event is clear and correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/pages/developers/tutorials/localnet.mdx (1 hunks)
Additional context used
LanguageTool
src/pages/developers/tutorials/localnet.mdx
[typographical] ~76-~76: Consider inserting a comma for improved readability.
Context: ...s are deployed on the same local testnet we will think of Hello as running on ZetaC...(MISSING_COMMAS)
Additional comments not posted (12)
src/pages/developers/tutorials/localnet.mdx (12)
1-2
: LGTM!The introductory section is clear and concise.
4-13
: LGTM!The Localnet features section is clear and concise.
15-21
: LGTM!The section on cloning the example contracts repo and installing dependencies is clear and concise.
23-25
: LGTM!The section on installing Localnet is clear and concise.
27-31
: LGTM!The section on starting Localnet is clear and concise.
33-51
: LGTM!The section on Localnet output is clear and concise.
53-54
: LGTM!The section on keeping the terminal window open is clear and concise.
55-74
: LGTM!The section on compiling and deploying contracts is clear and concise.
81-110
: LGTM!The section on calling a universal app from EVM is clear and concise.
112-146
: LGTM!The section on calling a universal app from EVM and reverting is clear and concise.
148-174
: LGTM!The section on calling a receiver contract from a universal app is clear and concise.
176-181
: LGTM!The concluding section is clear and concise.
@bbbeeeee @brewmaster012 @zeta-chain/fullstack please, review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
Localnet tutorial.
Depends on zeta-chain/example-contracts#189
Summary by CodeRabbit