-
Notifications
You must be signed in to change notification settings - Fork 148
Use deploy commands instead of Forge #703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe tutorials update deployment commands from Forge/ts-node to a TSX-based CLI across call, hello, and swap guides. Output parsing switches from .deployedTo to .contractAddress. hello.mdx also includes presentational line-wrapping changes. No API or code signatures are altered. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer Shell
participant CLI as TSX Deploy CLI
participant RPC as RPC/Gateway
Dev->>CLI: npx tsx commands deploy --private-key ... [--rpc --gateway]
CLI->>RPC: Send deploy transaction
RPC-->>CLI: Deployment receipt (includes contractAddress)
CLI-->>Dev: JSON output
Dev->>Dev: jq -r .contractAddress -> store/echo
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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 comments (3)
src/pages/developers/tutorials/swap.mdx (1)
462-467: Use TSX CLI for consistency in swap tutorialThe
swap.mdxtutorial still invokes the deploy script viats-node, while all other tutorials uniformly use thenpx tsx commands deployentrypoint. Please update the snippet atsrc/pages/developers/tutorials/swap.mdx(around lines 462–467) as follows:-UNIVERSAL=$(npx ts-node commands/index.ts deploy \ - --private-key $PRIVATE_KEY \ - --rpc http://localhost:8545 \ - --gateway $GATEWAY_ZETACHAIN \ - --uniswap-router $UNISWAP_ROUTER | jq -r .contractAddress) && echo $UNIVERSAL +UNIVERSAL=$(npx tsx commands deploy \ + --private-key $PRIVATE_KEY \ + --rpc http://localhost:8545 \ + --gateway $GATEWAY_ZETACHAIN \ + --uniswap-router $UNISWAP_ROUTER | jq -r .contractAddress) && echo $UNIVERSALThis aligns
swap.mdxwith thecall.mdxandhello.mdxtutorials.src/pages/developers/tutorials/call.mdx (2)
313-314: Grammar fix: double period.Replace “use zero address..” with a single period.
- `call` with no token transfer, use zero address.. + `call` with no token transfer, use zero address.
453-470: Switch Localnet Deploy Commands to TSX CLIReplace the
forge createinvocations insrc/pages/developers/tutorials/call.mdx(around lines 453–470) with the TSX deploy CLI to match the pattern used elsewhere:-UNIVERSAL=$(forge create Universal \ - --rpc-url $RPC \ - --private-key $PRIVATE_KEY \ - --broadcast \ - --json \ - --constructor-args $GATEWAY_ZETACHAIN | jq -r .deployedTo) && echo $UNIVERSAL +UNIVERSAL=$(npx tsx commands deploy \ + --private-key $PRIVATE_KEY \ + --rpc $RPC \ + --gateway $GATEWAY_ZETACHAIN | jq -r .contractAddress) && echo $UNIVERSAL-CONNECTED=$(forge create Connected \ - --rpc-url $RPC \ - --private-key $PRIVATE_KEY \ - --broadcast \ - --json \ - --constructor-args $GATEWAY_ETHEREUM | jq -r .deployedTo) && echo $CONNECTED +CONNECTED=$(npx tsx commands deploy \ + --private-key $PRIVATE_KEY \ + --rpc $RPC \ + --gateway $GATEWAY_ETHEREUM | jq -r .contractAddress) && echo $CONNECTEDThis ensures localnet deployments use the same TSX CLI approach already established in this tutorial and others.
🧹 Nitpick comments (4)
src/pages/developers/tutorials/swap.mdx (1)
282-283: Switch to TSX deploy CLI looks good; consider explicit network flags for clarity.The move to
npx tsx commands deploywith.contractAddressextraction aligns with the PR objective. For parity with the “call” tutorial and to avoid any ambiguity about implicit defaults, consider passing--rpcand--gatewayexplicitly or add a short note stating that the deploy script auto-selects testnet RPC/gateway.src/pages/developers/tutorials/hello.mdx (3)
286-287: Testnet deploy: correct migration to TSX CLI and.contractAddress.Consider mirroring this approach in the Localnet section above (which still uses Forge) for a consistent developer experience. Suggested Localnet command:
UNIVERSAL=$(npx tsx commands deploy \ --private-key $PRIVATE_KEY \ --rpc http://localhost:8545 \ --gateway $GATEWAY_ZETACHAIN | jq -r .contractAddress) && echo $UNIVERSAL
343-345: Inline code span split across lines; tighten wording.The inline code for the command is broken across lines, which can render awkwardly. Rephrase and keep the code span on one line.
-After the transaction is initiated on Base Sepolia, ZetaChain's protocol -facilitates its cross-chain transfer and execution on the destination chain -(ZetaChain). To monitor the status of this cross-chain transaction, the `npx -zetachain query cctx` command is used, providing real-time updates on the -transaction's journey. +After the transaction is initiated on Base Sepolia, ZetaChain's protocol +facilitates its cross-chain transfer and execution on the destination chain +(ZetaChain). To monitor the status of this cross-chain transaction, use the +`npx zetachain query cctx` command, which provides real-time updates on the +transaction's journey.
379-382: Minor formatting polish on wrapped bullet items.The wrapped code spans within bullets are readable, but consider keeping each bullet’s code span on one line to avoid broken emphasis and improve scanability.
Also applies to: 391-392
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
src/pages/developers/tutorials/call.mdx(1 hunks)src/pages/developers/tutorials/hello.mdx(4 hunks)src/pages/developers/tutorials/swap.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/tutorials/hello.mdx
[grammar] ~344-~344: There might be a mistake here.
Context: ...used, providing real-time updates on the transaction's journey. The command for ...
(QB_NEW_EN)
[grammar] ~384-~384: There might be a mistake here.
Context: ...fully called on the destination chain. - Sender: 0x4955a3F38ff86ae92A914445099caa8eA2B9bA32: The address of the sender on the ori...
(QB_NEW_EN)
[grammar] ~386-~386: There might be a mistake here.
Context: ...f the sender on the originating chain. - Receiver: 0xFeb4F33d424D6685104624d985095dacab567151: The address of the receiver contract...
(QB_NEW_EN)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (3)
src/pages/developers/tutorials/call.mdx (2)
280-281: Testnet deploy: good migration to TSX CLI and.contractAddressextraction.
286-287: Connected deploy: good migration to TSX CLI and.contractAddressextraction.src/pages/developers/tutorials/hello.mdx (1)
249-251: OK to wrap the log line; rendering remains clear.
Related: zeta-chain/example-contracts#285
Summary by CodeRabbit