Skip to content

Conversation

Karkarmath
Copy link
Contributor

@Karkarmath Karkarmath commented Oct 6, 2025

Closes #217

@Karkarmath Karkarmath self-assigned this Oct 6, 2025
@Karkarmath Karkarmath requested a review from a team as a code owner October 6, 2025 17:01
Copy link

github-actions bot commented Oct 6, 2025

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --quiet --silently-ignore standard/tokens/jettons/how-to-find-Jetton-wallet.mdx 

Copy link

github-actions bot commented Oct 6, 2025

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --quiet --silently-ignore standard/tokens/jettons/how-to-find-Jetton-wallet.mdx 

Copy link

github-actions bot commented Oct 6, 2025

Thanks for the Jettons wallet doc update. A few high‑severity style‑guide issues need fixes before this can merge, all within standard/tokens/jettons/how-to-find-Jetton-wallet.mdx.

Findings (3)

High (3)

[HIGH] Placeholders not defined on first use

Location:

const JettonMinter = new TonWeb.token.jetton.JettonMinter(tonweb.provider, { address: '<jetton_MASTER_ADDRESS>' });
const jettonWalletAddress = await JettonMinter.getJettonWalletAddress(new TonWeb.utils.Address('<OWNER_WALLET_ADDRESS>'));

Description:
The snippet introduces <jetton_MASTER_ADDRESS> and <OWNER_WALLET_ADDRESS> without defining them at first use. The examples standard requires placeholders in angle brackets to be defined immediately so examples remain copy‑pasteable and unambiguous. Normalizing to <JETTON_MASTER_ADDRESS> also aligns with the <ANGLE_CASE> convention.

Suggestion:
Define both placeholders immediately after the code block and normalize the first one’s casing.

--- a/standard/tokens/jettons/how-to-find-Jetton-wallet.mdx
+++ b/standard/tokens/jettons/how-to-find-Jetton-wallet.mdx
@@
 import TonWeb from 'tonweb';
 const tonweb = new TonWeb();
-const JettonMinter = new TonWeb.token.jetton.JettonMinter(tonweb.provider, { address: '<jetton_MASTER_ADDRESS>' });
+const JettonMinter = new TonWeb.token.jetton.JettonMinter(tonweb.provider, { address: '<JETTON_MASTER_ADDRESS>' });
 const jettonWalletAddress = await JettonMinter.getJettonWalletAddress(new TonWeb.utils.Address('<OWNER_WALLET_ADDRESS>'));
@@
 console.log('jetton wallet address:', jettonWalletAddress.toString(true, true, true));

+Define placeholders (first use):
+<JETTON_MASTER_ADDRESS> — address of the jetton master (minter) contract.
+<OWNER_WALLET_ADDRESS> — address of the owner’s regular wallet.


#### [HIGH] Unofficial external link to API page
Location: https://github.com/tact-lang/mintlify-ton-docs/blob/eb6a2d4d7492f27596912ebfffdb03324eab7c71/standard/tokens/jettons/how-to-find-Jetton-wallet.mdx?plain=1#L39-L39

Description:
The link points to a Mintlify preview domain, which is not an official or stable source. The style guide requires canonical URLs; use an internal relative link or remove the link if there is no canonical target.

Suggestion:
Replace the preview-domain link with plain text to remove the unofficial reference. If/when a canonical internal page exists, update to a relative link.

```diff
-First, you can use a convenient page with [built-in APIs](https://companyname-a7d5b98e.mintlify.app/api-reference/jettons/get-jetton-wallets).
+First, you can use a convenient page with built-in APIs.

[HIGH] Unlabeled partial code snippets

Location:

```typescript
import TonWeb from 'tonweb';
const tonweb = new TonWeb();
const JettonMinter = new TonWeb.token.jetton.JettonMinter(tonweb.provider, { address: '<jetton_MASTER_ADDRESS>' });
const jettonWalletAddress = await JettonMinter.getJettonWalletAddress(new TonWeb.utils.Address('<OWNER_WALLET_ADDRESS>'));
// It is important to verify that the jetton master recognizes this wallet:
const jettonWallet = new TonWeb.token.jetton.JettonWallet(tonweb.provider, {
address: jettonWalletAddress
});
const jettonData = await jettonWallet.getData();
if (jettonData.JettonMinterAddress.toString(false) !== JettonMinter.address.toString(false)) {
throw new Error('jetton minter address from jetton wallet does not match config');
}
console.log('jetton wallet address:', jettonWalletAddress.toString(true, true, true));
```

Description:
The TypeScript examples are partial/non‑runnable (e.g., top‑level await, missing setup, placeholders) but lack the required “Not runnable” label. Per the style guide, partial snippets must be labeled to prevent copy/paste failures. Additional unlabeled occurrences also appear at L46 and L124.

Suggestion:
Add “Not runnable” immediately above each partial snippet.

--- a/standard/tokens/jettons/how-to-find-Jetton-wallet.mdx
+++ b/standard/tokens/jettons/how-to-find-Jetton-wallet.mdx
@@
 the Jetton master contract provides the `get_wallet_address (slice owner_address)` method.
+Not runnable
 ```typescript
@@
-However, if you know the jetton wallet code and storage structure, you can calculate the wallet address without making network requests.
+However, if you know the jetton wallet code and storage structure, you can calculate the wallet address without making network requests.
+Not runnable
 ```typescript
@@
-of the Jetton wallet and thus calculate its address.
+of the Jetton wallet and thus calculate its address.
+Not runnable
 ```typescript

verytactical
verytactical previously approved these changes Oct 7, 2025
@hacker-volodya hacker-volodya removed the request for review from a team October 7, 2025 18:59

![Tether USDT master contract](/resources/images/methods.png)

Finally, you can use [built-in APIs](/ecosystem/rpc/toncenter).
Copy link
Member

Choose a reason for hiding this comment

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

How exactly should I use TonCenter's API for this?

Copy link
Member

Choose a reason for hiding this comment

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

Aren't we already using it in the code snippet above?

...
const client = new TonClient({
        endpoint: 'https://toncenter.com/api/v2/jsonRPC',
    });
...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@anton-trunov,

I want to refer to convinient https://companyname-a7d5b98e.mintlify.app/api-reference/jettons/list-jetton-wallets page, but I do not know how to do it correctly, since in the repo there is no specific page for it.

Copy link
Member

@anton-trunov anton-trunov left a comment

Choose a reason for hiding this comment

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

Added a few more comments

Copy link

github-actions bot commented Oct 8, 2025

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore standard/tokens/jettons/how-to-find.mdx 

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.

[Jetton > How to: find Jetton wallet]
3 participants