-
Notifications
You must be signed in to change notification settings - Fork 7
add ton center cookbook guides #493
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
Kaladin13
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.
More context please
ecosystem/rpc/cookbook/traces.mdx
Outdated
| Traces expand a single transaction into a tree of all triggered calls, including intermediate contract executions, fees, and message flows. | ||
|
|
||
| This recipe is useful for: | ||
| - **Exchanges** validating deposits end-to-end |
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.
+Bridges for indexing trace finality
ecosystem/rpc/cookbook/traces.mdx
Outdated
|
|
||
| --- | ||
|
|
||
| ## 1. Fetching a trace by transaction hash |
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.
Let's add more context, how we obtain this hash?
There is existing page about it in new docs, ask @Shvandre
| --- | ||
|
|
||
| ## 2. Understanding the response | ||
|
|
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.
Let's comment on what info is inside JSON, e.g. info about all trace txs steps and state changes
ecosystem/rpc/cookbook/traces.mdx
Outdated
| import fetch from "node-fetch"; | ||
|
|
||
| const endpoint = "https://toncenter.com/api/v3/traces"; | ||
| const txHash = "Vy11B+AiGGrDBcGx3UiUFUJozUQ3U2yHvaATSrS03og="; |
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.
Comment about externals
|
@laviniat1996 how is it going with this PR? it's been a while you pushed any fixes. do you need any help? |
|
@anton-trunov I'm still working on it. Traces is quite a big topic, and I am trying to cover it as good as possible. You can expect an update today |
|
To fix the formatting issues:
npx remark -o --silent --silently-ignore ecosystem/rpc/cookbook/traces.mdx ecosystem/rpc/cookbook/wallet-monitor.mdx |
|
To fix the formatting issues:
npx remark -o --silent --silently-ignore ecosystem/rpc/cookbook/traces.mdx ecosystem/rpc/cookbook/wallet-monitor.mdx |
|
To fix the formatting issues:
npx remark -o --silent --silently-ignore ecosystem/rpc/cookbook/traces.mdx ecosystem/rpc/cookbook/wallet-monitor.mdx |
a2d653d to
b37dc9b
Compare
90cc9ba to
c2c7b2d
Compare
|
To fix the formatting issues:
npx remark -o --silent --silently-ignore ecosystem/rpc/cookbook/traces.mdx ecosystem/rpc/cookbook/wallet-monitor.mdx |
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.
Thanks for the updates—there are several suggestions in ecosystem/rpc/cookbook/traces.mdx and ecosystem/rpc/cookbook/wallet-monitor.mdx. Please apply the inline suggestions to align callouts with the style guide.
| <Info> | ||
| The examples use the public Ton Center endpoint: | ||
|
|
||
| ``` | ||
| https://toncenter.com/api/v3/traces | ||
| ``` | ||
|
|
||
| For production, request your own API key and use a dedicated endpoint for higher rate limits and stability. | ||
| </Info> |
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.
[HIGH] Callout uses unsupported <Info> component (use <Aside> instead)
This callout uses <Info>…</Info>, which is not the approved admonition component. The style guide requires using <Aside> for callouts to ensure consistent rendering and accessibility. Replace <Info> with <Aside type="note"> and preserve the existing content.
| <Info> | |
| The examples use the public Ton Center endpoint: | |
| ``` | |
| https://toncenter.com/api/v3/traces | |
| ``` | |
| For production, request your own API key and use a dedicated endpoint for higher rate limits and stability. | |
| </Info> | |
| <Aside type="note" title="Endpoint"> | |
| The examples use the public Ton Center endpoint: | |
https://toncenter.com/api/v3/traces
For production, request your own API key and use a dedicated endpoint for higher rate limits and stability.
</Aside>
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
| > **Workflow tip** | ||
| > | ||
| > 1. **Before sending:** emulate to check success, cost, and side effects. | ||
| > 1. **After confirmation:** fetch the on-chain trace to verify final behavior and outcomes. |
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.
[HIGH] Blockquote used as callout (use <Aside>; blockquotes not allowed for admonitions)
A Markdown blockquote is used to present a “Workflow tip” callout. The style guide forbids simulating callouts with blockquotes; admonitions must be implemented with <Aside> using an appropriate type. This ensures consistent rendering, accessibility, and tooling.
| > **Workflow tip** | |
| > | |
| > 1. **Before sending:** emulate to check success, cost, and side effects. | |
| > 1. **After confirmation:** fetch the on-chain trace to verify final behavior and outcomes. | |
| <Aside type="tip" title="Workflow tip"> | |
| 1. Before sending: emulate to check success, cost, and side effects. | |
| 1. After confirmation: fetch the on-chain trace to verify final behavior and outcomes. | |
| </Aside> |
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
| - match the transaction by comparing the normalized input message. | ||
|
|
||
| <Aside | ||
| type="warning" |
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.
[HIGH] Unsupported
The <Aside> uses type="warning", which is not a supported value in this codebase. The style guide allows only note, tip, caution, or danger, and explicitly disallows warning. Use type="danger" for true warnings or type="caution" for less severe cautions. See https://github.com/ton-org/docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L525-L528 for the allowed type list and mapping guidance.
| type="warning" | |
| type="caution" |
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
| <Info> | ||
| The examples use the public Ton Center endpoint: | ||
|
|
||
| ``` | ||
| https://toncenter.com/api/v2/jsonRPC | ||
| ``` | ||
|
|
||
| For production, you should request your own API key and use a dedicated endpoint for higher rate limits and stability. | ||
| </Info> |
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.
[HIGH] Callout uses unsupported <Info> component (use <Aside> instead)
This callout also uses <Info>…</Info>. Per the style guide, callouts must use the <Aside> component to maintain consistent styling and accessibility. Convert it to <Aside type="note"> and retain the current content.
| <Info> | |
| The examples use the public Ton Center endpoint: | |
| ``` | |
| https://toncenter.com/api/v2/jsonRPC | |
| ``` | |
| For production, you should request your own API key and use a dedicated endpoint for higher rate limits and stability. | |
| </Info> | |
| <Aside type="note" title="Endpoint"> | |
| The examples use the public Ton Center endpoint: | |
https://toncenter.com/api/v2/jsonRPC
For production, you should request your own API key and use a dedicated endpoint for higher rate limits and stability.
</Aside>
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
|
/review |
|
Re-deployed: View deployment |
|
@laviniat1996 please fix the AI review issues |
This adds the first two guides for the TON Center Cookbook: