-
Notifications
You must be signed in to change notification settings - Fork 59
feat: add js sdk docs #120
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
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughIntroduces comprehensive JavaScript/TypeScript SDK documentation for Morph, covering installation, quick start guides, API reference, and serialization utilities. The documentation is integrated into the site navigation and sidebar structure for discoverability. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. 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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/build-on-morph/sdk/js-sdk.md`:
- Around line 43-73: Add a language identifier to the fenced ASCII diagram code
block so markdown linters accept it: change the opening triple backticks from
``` to ```text (or ```plaintext) for the ASCII diagram block (the block that
begins with the box drawing
"┌─────────────────────────────────────────────────────────┐" and the closing
```), leaving the diagram content unchanged.
🧹 Nitpick comments (2)
sidebars.js (1)
104-104: Consider using explicit format for consistency.The new entry uses the string shorthand format, while most other entries in this section use the explicit
{ type: 'doc', id: '...', label: '...' }format. Both are valid, but using the explicit format would be more consistent with the surrounding entries and allows control over the sidebar label.📝 Suggested change for consistency
- 'build-on-morph/sdk/js-sdk', + { type: 'doc', id: 'build-on-morph/sdk/js-sdk', label: 'JS SDK' },docs/build-on-morph/sdk/js-sdk.md (1)
684-698: Consider clarifying "Required" context in the table.The table marks
gasLimit,maxFeePerGas, andmaxPriorityFeePerGasas required, but thepopulateTransactionexample below (lines 781-789) omits these fields since they get auto-filled. Consider adding a note that these are required forsignTransaction/sendTransactionbut can be auto-populated viapopulateTransaction.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
docs/build-on-morph/sdk/js-sdk.mddocusaurus.config.jssidebars.js
🧰 Additional context used
🪛 LanguageTool
docs/build-on-morph/sdk/js-sdk.md
[grammar] ~143-~143: Ensure spelling is correct
Context: ...k/ethers5 ``` --- ## Quick Start ### Viem quick start Send an Alt Fee Transactio...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.18.1)
docs/build-on-morph/sdk/js-sdk.md
43-43: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (3)
docs/build-on-morph/sdk/js-sdk.md (2)
147-191: LGTM!The Viem quick start example is well-structured, demonstrating the key workflow of creating clients and sending Alt Fee Transactions with clear comments for each step.
300-628: Well-documented API reference.The API reference section is comprehensive with clear parameter tables, return types, and practical examples for serialization, parsing, address recovery, and utility functions.
docusaurus.config.js (1)
200-205: LGTM!The navbar item is correctly configured, following the existing pattern for documentation links. The
type: 'doc'with the matchingdocIdwill provide direct navigation to the JS SDK documentation.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| ``` | ||
| ┌─────────────────────────────────────────────────────────┐ | ||
| │ Your Application │ | ||
| └─────────────────────────────────────────────────────────┘ | ||
| │ | ||
| ┌─────────────────────┼─────────────────────┐ | ||
| │ │ │ | ||
| ▼ ▼ ▼ | ||
| ┌─────────────┐ ┌─────────────┐ ┌──────────────┐ | ||
| │ @morph- │ │ @morph- │ │ @morph- │ | ||
| │ network/ │ │ network/ │ │ network/ │ | ||
| │ viem │ │ ethers │ │ ethers5 │ | ||
| └─────────────┘ └─────────────┘ └──────────────┘ | ||
| │ │ │ | ||
| └─────────────────────┼─────────────────────┘ | ||
| │ | ||
| ▼ | ||
| ┌─────────────────┐ | ||
| │ @morph-network/ │ | ||
| │ chain │ | ||
| └─────────────────┘ | ||
| │ | ||
| ┌─────────────────────┴─────────────────────┐ | ||
| ▼ ▼ | ||
| ┌─────────────┐ ┌─────────────┐ | ||
| │ Morph │ │ Morph │ | ||
| │ Mainnet │ │ Hoodi │ | ||
| │ (2818) │ │ Testnet │ | ||
| │ │ │ (2910) │ | ||
| └─────────────┘ └─────────────┘ | ||
| ``` |
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.
Add a language identifier to the fenced code block.
The ASCII architecture diagram should have a language identifier to satisfy markdown linting rules. Use text or plaintext for ASCII diagrams.
📝 Suggested fix
-```
+```text
┌─────────────────────────────────────────────────────────┐
│ Your Application │📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| ┌─────────────────────────────────────────────────────────┐ | |
| │ Your Application │ | |
| └─────────────────────────────────────────────────────────┘ | |
| │ | |
| ┌─────────────────────┼─────────────────────┐ | |
| │ │ │ | |
| ▼ ▼ ▼ | |
| ┌─────────────┐ ┌─────────────┐ ┌──────────────┐ | |
| │ @morph- │ │ @morph- │ │ @morph- │ | |
| │ network/ │ │ network/ │ │ network/ │ | |
| │ viem │ │ ethers │ │ ethers5 │ | |
| └─────────────┘ └─────────────┘ └──────────────┘ | |
| │ │ │ | |
| └─────────────────────┼─────────────────────┘ | |
| │ | |
| ▼ | |
| ┌─────────────────┐ | |
| │ @morph-network/ │ | |
| │ chain │ | |
| └─────────────────┘ | |
| │ | |
| ┌─────────────────────┴─────────────────────┐ | |
| ▼ ▼ | |
| ┌─────────────┐ ┌─────────────┐ | |
| │ Morph │ │ Morph │ | |
| │ Mainnet │ │ Hoodi │ | |
| │ (2818) │ │ Testnet │ | |
| │ │ │ (2910) │ | |
| └─────────────┘ └─────────────┘ | |
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
43-43: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In `@docs/build-on-morph/sdk/js-sdk.md` around lines 43 - 73, Add a language
identifier to the fenced ASCII diagram code block so markdown linters accept it:
change the opening triple backticks from ``` to ```text (or ```plaintext) for
the ASCII diagram block (the block that begins with the box drawing
"┌─────────────────────────────────────────────────────────┐" and the closing
```), leaving the diagram content unchanged.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.