-
Notifications
You must be signed in to change notification settings - Fork 29
On Adding Gluon SDK Tutorial. #31
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
On Adding Gluon SDK Tutorial. #31
Conversation
WalkthroughAdded a new tutorial article and its index entry: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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: 4
🧹 Nitpick comments (2)
public/articles/gluon-sdk-tutorial.md (2)
29-31: Clarify the Promise assignment pattern.Line 30 assigns the result of
import()togluonwithout awaiting, but the pattern later expects it to be awaited (line 38). While this works, it's unconventional. Consider making the intent clearer:if (typeof window !== 'undefined') { - gluon = import('gluon-gold-sdk'); + gluon = import('gluon-gold-sdk'); // Promise assigned, resolved below }Alternatively, if dynamic import at module load time is desired, explicitly document why the Promise is deferred.
35-35: Fix grammatical error in sentence.Line 35 contains "let's you interact" which is grammatically incorrect; should be "lets you interact" (without apostrophe, as a verb in third person).
-You can create a new instance of Gluon which let's you interact with the protocol. +You can create a new instance of Gluon which lets you interact with the protocol.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
public/articles/articles-index.json(8 hunks)public/articles/gluon-sdk-tutorial.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
public/articles/gluon-sdk-tutorial.md
[grammar] ~11-~11: Ensure spelling is correct
Context: ...d transmutations of stable and volatile tokeons (a.k.a. neutrons and protons, respectiv...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.18.1)
public/articles/gluon-sdk-tutorial.md
21-21: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
28-28: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
37-37: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
47-47: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
52-52: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
74-74: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
90-90: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
101-101: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
109-109: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
117-117: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
127-127: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
135-135: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
141-141: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
156-156: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
169-169: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
182-182: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
195-195: Bare URL used
(MD034, no-bare-urls)
🔇 Additional comments (5)
public/articles/gluon-sdk-tutorial.md (2)
172-173: Resolve inconsistent awaiting of async calls.Line 172 calls
getPrice()withoutawait, but line 173 callsgetPricePerGram()withawait. If both are async methods returning promises, they should be consistently awaited.Verify whether
getPrice()andgetPricePerGram()have different return types (one synchronous, one async), or if this is an oversight:-const oracleGoldPricePerKg = await oracleBoxJs.getPrice(); +const oracleGoldPricePerKg = oracleBoxJs.getPrice(); // if synchronous const oracleGoldPricePerGram = await oracleBoxJs.getPricePerGram();Or alternatively, if both are async:
-const oracleGoldPricePerKg = await oracleBoxJs.getPrice(); +const oracleGoldPricePerKg = await oracleBoxJs.getPrice(); const oracleGoldPricePerGram = await oracleBoxJs.getPricePerGram();
185-186: Verify variable naming consistency.Lines 185–186 reference a
gluonobject (e.g.,gluon.accumulateVolumeProtonsToNeutrons(n)), but earlier sections usegluonInstancefor the Gluon SDK instance. Verify this is intentional or align the naming:If
gluonis the same instance, update for consistency:-const volumeProtonsToNeutrons = await gluon.accumulateVolumeProtonsToNeutrons(n); +const volumeProtonsToNeutrons = await gluonInstance.accumulateVolumeProtonsToNeutrons(n); -const volumeNeutronsToProtons = await gluon.accumulateVolumeNeutronsToProtons(n); +const volumeNeutronsToProtons = await gluonInstance.accumulateVolumeNeutronsToProtons(n);public/articles/articles-index.json (3)
76-82: Verify new gluon-sdk-tutorial entry aligns with markdown frontmatter.The new entry looks correct and matches the frontmatter in the
gluon-sdk-tutorial.mdfile (title, author, date, image, excerpt all aligned). Entry structure is valid.Verify that the article will be served correctly by confirming the markdown file exists at
public/articles/gluon-sdk-tutorial.mdand the slug routing is configured to map this entry to that file.
3-110: Verify the impact of slug renames on existing links and routing.This PR renames 7 article slugs (lines 4, 22, 31, 40, 58, 67, 103). If these articles are already published and linked externally, the URL changes will break those links.
Confirm whether:
- A redirect/alias mechanism is in place for old slugs
- No external links depend on the old slugs
- Search engine redirects have been configured (301 redirects)
If this site supports URL aliases or redirects, document the migration plan for downstream consumers.
85-92: Verify slug change for challenges article does not break existing links.Line 85 introduces a new slug
challenges-of-backing-by-basket-of-assetswhich appears to replace the previousbasket-backing-challengesentry. If external links or references to the old slug exist, they will now return 404.Before merging:
- Search the codebase for any hardcoded references to the old slug
basket-backing-challenges- Check git history to confirm this is a replacement and not a duplicate entry
- If the old slug was previously live, implement a redirect or alias to preserve external links
Updated link formatting for the SDK's GitHub repository.
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
♻️ Duplicate comments (1)
public/articles/gluon-sdk-tutorial.md (1)
21-21: Add language identifiers to all fenced code blocks.All code blocks lack language identifiers, which violates markdown linting (MD040). This issue was flagged in a previous review. Add the appropriate language tag to each code block:
- Line 21: use
bash(npm install command)- All other code blocks: use
javascriptApply language identifiers to resolve the linting violations:
-``` +```bash npm install gluon-gold-sdk@1.0.0```diff -``` +```javascript if (typeof window !== 'undefined') { gluon = import('gluon-gold-sdk'); }Similar updates are needed for all remaining code blocks on lines 37, 47, 52, 74, 90, 101, 109, 117, 127, 135, 141, 156, 169, and 182—each should be tagged with `javascript`. Also applies to: 28-28, 37-37, 47-47, 52-52, 74-74, 90-90, 101-101, 109-109, 117-117, 127-127, 135-135, 141-141, 156-156, 169-169, 182-182 </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 818ea5433bb79dcc11688653115da9e55d19fbb8 and 31771bc0054f71bab843c30cf8c0145820d77f7b. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `public/articles/gluon-sdk-tutorial.md` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🪛 LanguageTool</summary> <details> <summary>public/articles/gluon-sdk-tutorial.md</summary> [grammar] ~11-~11: Ensure spelling is correct Context: ...d transmutations of stable and volatile tokeons (a.k.a. neutrons and protons, respectiv... (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) </details> </details> <details> <summary>🪛 markdownlint-cli2 (0.18.1)</summary> <details> <summary>public/articles/gluon-sdk-tutorial.md</summary> 21-21: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 28-28: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 37-37: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 47-47: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 52-52: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 74-74: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 90-90: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 101-101: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 109-109: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 117-117: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 127-127: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 135-135: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 141-141: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 156-156: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 169-169: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 182-182: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 195-195: Link text should be descriptive (MD059, descriptive-link-text) </details> </details> </details> <details> <summary>🔇 Additional comments (2)</summary><blockquote> <details> <summary>public/articles/gluon-sdk-tutorial.md (2)</summary><blockquote> `1-7`: **Frontmatter metadata looks good.** The article metadata is well-formed and complete. --- `11-11`: **Static analysis note: "tokeons" is intentional domain terminology.** The grammar checker flagged "tokeons" as a spelling error, but this is a false positive. The text itself clarifies that it is domain-specific terminology for the Gluon protocol. No action needed. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
| Displaying these to the user will give them a good idea of the trend of the protocol. | ||
|
|
||
| ### More Stats | ||
| For a more complete list of statistics you can use (for example TVL), take a look at the README in the SDK’s GitHub repository: [here](https://github.com/StabilityNexus/Gluon-Ergo-SDK/blob/main/README.md) |
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.
🛠️ Refactor suggestion | 🟠 Major
Use descriptive link text instead of generic "here".
The link text should be descriptive to help readers understand the destination. Replace "here" with more meaningful text:
-For a more complete list of statistics you can use (for example TVL), take a look at the README in the SDK's GitHub repository: [here](https://github.com/StabilityNexus/Gluon-Ergo-SDK/blob/main/README.md)
+For a more complete list of statistics you can use (for example TVL), take a look at the [Gluon SDK README](https://github.com/StabilityNexus/Gluon-Ergo-SDK/blob/main/README.md).This improves accessibility and follows markdown linting standards (MD059).
📝 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.
| For a more complete list of statistics you can use (for example TVL), take a look at the README in the SDK’s GitHub repository: [here](https://github.com/StabilityNexus/Gluon-Ergo-SDK/blob/main/README.md) | |
| For a more complete list of statistics you can use (for example TVL), take a look at the [Gluon SDK README](https://github.com/StabilityNexus/Gluon-Ergo-SDK/blob/main/README.md). |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
195-195: Link text should be descriptive
(MD059, descriptive-link-text)
🤖 Prompt for AI Agents
In public/articles/gluon-sdk-tutorial.md around line 195, the link uses
non-descriptive text "here"; update the markdown to replace "here" with
descriptive link text (e.g., "Gluon-Ergo-SDK README on GitHub" or "Gluon SDK
README") while keeping the same URL so the link is meaningful and satisfies
markdown linting MD059 and accessibility best practices.
This commit:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.