Skip to content

Conversation

@laviniat1996
Copy link
Collaborator

This adds the first two guides for the TON Center Cookbook:

  • wallet monitor
  • traces explanation

Copy link
Collaborator

@Kaladin13 Kaladin13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More context please

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
Copy link
Collaborator

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


---

## 1. Fetching a trace by transaction hash
Copy link
Collaborator

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

Copy link
Collaborator

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

import fetch from "node-fetch";

const endpoint = "https://toncenter.com/api/v3/traces";
const txHash = "Vy11B+AiGGrDBcGx3UiUFUJozUQ3U2yHvaATSrS03og=";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment about externals

@anton-trunov
Copy link
Collaborator

@laviniat1996 how is it going with this PR? it's been a while you pushed any fixes. do you need any help?

@laviniat1996
Copy link
Collaborator Author

@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

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore ecosystem/rpc/cookbook/traces.mdx ecosystem/rpc/cookbook/wallet-monitor.mdx 

@github-actions
Copy link

github-actions bot commented Oct 9, 2025

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore ecosystem/rpc/cookbook/traces.mdx ecosystem/rpc/cookbook/wallet-monitor.mdx 

@github-actions
Copy link

github-actions bot commented Oct 9, 2025

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore ecosystem/rpc/cookbook/traces.mdx ecosystem/rpc/cookbook/wallet-monitor.mdx 

@github-actions
Copy link

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore ecosystem/rpc/cookbook/traces.mdx ecosystem/rpc/cookbook/wallet-monitor.mdx 

@laviniat1996 laviniat1996 marked this pull request as ready for review October 29, 2025 04:41
Copy link

@github-actions github-actions bot left a 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.

Comment on lines +16 to +24
<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>

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.

Suggested change
<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!

Comment on lines +53 to +56
> **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.

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.

Suggested change
> **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"

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.

Suggested change
type="warning"
type="caution"

Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!

Comment on lines +15 to +23
<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>

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.

Suggested change
<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!

@verytactical
Copy link
Collaborator

/review

@novusnota
Copy link
Collaborator

Re-deployed: View deployment

@anton-trunov anton-trunov marked this pull request as draft October 29, 2025 17:38
@anton-trunov
Copy link
Collaborator

@laviniat1996 please fix the AI review issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ecosystem > RPC > TON Center Cookbook]

6 participants