-
Notifications
You must be signed in to change notification settings - Fork 149
Gas page improvements #511
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 Git ↗︎
|
|
Warning Rate limit exceeded@fadeev has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 27 minutes and 23 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces substantial modifications to the documentation regarding gas fees for universal apps on ZetaChain. The "Overview" section has been replaced with "Calling Universal Apps," detailing the fee structure associated with these applications. The document now clarifies that fees are paid in the native gas token of the source chain and outlines the gas fee requirements for direct contract calls on ZetaChain's EVM. Additionally, the "Withdraw" section has been expanded with instructions for querying gas fees, and the "Current omnichain fees" section has been renamed to "Current Fees" to reflect updated content. Changes
Possibly related PRs
Suggested reviewers
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 (
|
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 and nitpick comments (3)
src/pages/developers/evm/gas.mdx (3)
19-20: Fix typographical error in documentation linkThere's a double comma in the Ethereum gas documentation reference.
-Ethereum gas,, refer to the [official +Ethereum gas, refer to the [official🧰 Tools
🪛 LanguageTool
[typographical] ~19-~19: Two consecutive commas
Context: ...For detailed information on Ethereum gas,, refer to the [official documentation](h...(DOUBLE_PUNCTUATION)
36-37: Improve grammar in gas fee query descriptionThe word "withdraw" is being used incorrectly as a noun.
-Before making a call from a universal app to a contract on a connected chain, query the withdraw gas fee +Before making a call from a universal app to a contract on a connected chain, query the withdrawal gas fee🧰 Tools
🪛 LanguageTool
[grammar] ~37-~37: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...ontract on a connected chain, query the withdraw gas fee for the expected gas limit: ``...(PREPOSITION_VERB)
31-34: Consider adding gas estimation examplesThe documentation effectively explains the gas fee mechanism, but could benefit from practical examples of gas estimation for common operations. This would help developers better understand the cost implications of different operations.
Consider adding:
- Examples of typical gas costs for common operations
- Best practices for gas optimization
- Guidelines for setting appropriate gas limits
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
src/pages/developers/evm/gas.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/evm/gas.mdx
[typographical] ~19-~19: Two consecutive commas
Context: ...For detailed information on Ethereum gas,, refer to the [official documentation](h...
(DOUBLE_PUNCTUATION)
[grammar] ~37-~37: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...ontract on a connected chain, query the withdraw gas fee for the expected gas limit: ``...
(PREPOSITION_VERB)
[grammar] ~49-~49: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ... tokens to a connected chain, query the withdraw gas fee: ```solidity (address gasZRC20...
(PREPOSITION_VERB)
🔇 Additional comments (3)
src/pages/developers/evm/gas.mdx (3)
39-41: LGTM: Well-structured code example
The code snippet effectively demonstrates how to query gas fees with a specific gas limit.
49-54: LGTM: Clear withdrawal fee query example
The code example and explanation for querying withdrawal fees are clear and accurate.
🧰 Tools
🪛 LanguageTool
[grammar] ~49-~49: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ... tokens to a connected chain, query the withdraw gas fee: ```solidity (address gasZRC20...
(PREPOSITION_VERB)
65-67: Verify the accuracy of the default gas limit
The documentation mentions a default gas limit of 500,000. Let's verify this value is current and consistent with the template repository.
✅ Verification successful
Default gas limit of 500,000 is verified and consistent
The default gas limit of 500,000 is confirmed to be accurate and consistently used across the codebase:
- Used in frontend toolkit's default configuration (ZetaChainClient and sendZeta function)
- Referenced in deployment scripts for NFT contracts
- Documented in the gas fee calculation section
- Consistently used in tutorials and example code
The value is also properly integrated with the withdraw gas fee system through withdrawGasFeeWithGasLimit() function calls.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the default gas limit in the template repository
# Check for gas limit references in the template repository
gh repo clone zeta-chain/template /tmp/template 2>/dev/null || true
cd /tmp/template
rg -i "500,000|500000" -A 3 -B 3
Length of output: 103
Script:
#!/bin/bash
# Let's search for gas limit references in the codebase
rg -i "gas.?limit" -A 3 -B 3
# Also search for specific numbers that might indicate gas limits
rg -i "500,000|500000|gas.*fee" -A 3 -B 3
# Check if there are any configuration files that might contain gas limits
fd -e json -e toml -e yaml -e yml -X rg -i "gas"
Length of output: 139412
Script:
#!/bin/bash
# Let's search for gas limit references in the fungible module and crosschain module
rg -i "gas.?limit.*500|500.*gas.?limit" -A 3 -B 3
# Search for withdraw fee configurations
rg -i "withdraw.*fee.*gas|gas.*withdraw.*fee" -A 3 -B 3
# Look for gas limit configurations in config files
fd -e json -e toml -e yaml -e yml -X rg -i "gas.?limit.*=|gas.?limit.*:" -A 3 -B 3
Length of output: 17632
hernan-clich
left a comment
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.
Tested ACK
Co-authored-by: Hernan Clich <62221379+hernan-clich@users.noreply.github.com>
Co-authored-by: Hernan Clich <62221379+hernan-clich@users.noreply.github.com>
Co-authored-by: Hernan Clich <62221379+hernan-clich@users.noreply.github.com>
Summary by CodeRabbit
New Features
Documentation