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
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
Member

@Gusarich Gusarich left a comment

Choose a reason for hiding this comment

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

what about getting it onchain? or do we have that covered in some other page?

Copy link

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 

@Karkarmath Karkarmath requested review from anton-trunov and removed request for Kaladin13, skywardboundd and verytactical October 13, 2025 09:31
@Karkarmath Karkarmath marked this pull request as ready for review October 13, 2025 09:37
Copy link

Thanks for the update to the Jetton docs. One blocking fix is needed before merge to keep examples copy/paste‑safe.

Findings (1)

High (1)

[HIGH] Code examples not copy‑pasteable; placeholders missing/undefined

Location:

  • standard/tokens/jettons/how-to-find.mdx?plain=1#L18-L21
  • standard/tokens/jettons/how-to-find.mdx?plain=1#L66-L66

Description:
The TypeScript examples embed instructional text as string literals (e.g., “put the Jetton master address in any format”), which breaks copy/pasteability and causes runtime parse errors. The style guide requires copy/paste‑safe placeholders defined on first use. The same issue recurs at the later snippet.

Suggestion:
Either of the following reviewer-provided patches resolves it.

Suggested change (Reviewer #2):

--- a/standard/tokens/jettons/how-to-find.mdx
+++ b/standard/tokens/jettons/how-to-find.mdx
@@
-  const jettonMasterAddress = Address.parse(
-    "put the Jetton master address in any format",
-  );
-  const walletAddress = Address.parse("put owner's address in any format");
+  const jettonMasterAddress = Address.parse("EQC_REPLACE_WITH_MASTER_ADDRESS");
+  const walletAddress = Address.parse("EQC_REPLACE_WITH_OWNER_ADDRESS");
@@
-const ownerAddress = Address.parse("an address in any format");
+const ownerAddress = Address.parse("EQC_REPLACE_WITH_OWNER_ADDRESS");
@@
-void main();
+void main();
+
+Placeholders:
+- EQC_REPLACE_WITH_MASTER_ADDRESS — Jetton master address (any supported string form).
+- EQC_REPLACE_WITH_OWNER_ADDRESS — owner wallet address (any supported string form).

Suggested change (Reviewer #4):

--- a/standard/tokens/jettons/how-to-find.mdx
+++ b/standard/tokens/jettons/how-to-find.mdx
@@
-  const jettonMasterAddress = Address.parse(
-    "put the Jetton master address in any format",
-  );
-  const walletAddress = Address.parse("put owner's address in any format");
+  const jettonMasterAddress = Address.parse("<JETTON_MASTER_ADDR>");
+  const walletAddress = Address.parse("<OWNER_ADDR>");
@@
 void main();

+Define placeholders (first use):
+<JETTON_MASTER_ADDR> — address of the jetton master contract.
+<OWNER_ADDR> — address of the wallet owner.
@@
-const ownerAddress = Address.parse("an address in any format");
+const ownerAddress = Address.parse("<OWNER_ADDR>");

@anton-trunov anton-trunov merged commit d970ed3 into main Oct 13, 2025
5 checks passed
@anton-trunov anton-trunov deleted the how-to-find-jetton-wallet branch October 13, 2025 10:10
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]

4 participants