-
Notifications
You must be signed in to change notification settings - Fork 0
Add how to get wallet data page #596
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
To fix the formatting issues:
npx remark -o --quiet --silently-ignore standard/tokens/jettons/how-to-get-wallet-data.mdx |
Thanks for the updates in the jetton wallet docs area. A few high‑severity items need fixes to meet the style guide and keep examples copy‑pasteable and links canonical. Findings (3)High (3)[HIGH] Placeholder is not in <ANGLE_CASE> and undefinedLocation:
Description: Suggestion: -const walletAddress = "wallet of interest in any format";
+const walletAddress = "<WALLET_ADDR>"; Define placeholders (first use): [HIGH] JS snippet is not copy‑pasteable; missing proper placeholdersLocation: mintlify-ton-docs/standard/tokens/jettons/how-to-get-wallet-data.mdx Lines 19 to 36 in 5ef3b30
Description: Suggestion: ```javascript
import TonWeb from "tonweb";
const tonweb = new TonWeb();
-const walletAddress = "wallet of interest in any format";
-const jettonWallet = new TonWeb.token.jetton.JettonWallet(tonweb.provider,{address: walletAddress});
-const data = await jettonWallet.getData();
-console.log('jetton balance:', data.balance.toString());
-console.log('jetton owner address:', data.ownerAddress.toString(true, true, true));
-
-// It is important to verify that the jetton master recognizes the wallet
-const JettonMinter = new TonWeb.token.jetton.JettonMinter(tonweb.provider, {address: data.JettonMinterAddress.toString(false)});
-const expectedjettonWalletAddress = await JettonMinter.getJettonWalletAddress(data.ownerAddress.toString(false));
-if (expectedjettonWalletAddress.toString(false) !== new TonWeb.utils.Address(walletAddress).toString(false)) {
- throw new Error('jetton minter does not recognize the wallet');
-}
-
-console.log('jetton master address:', data.JettonMinterAddress.toString(true, true, true));
+const walletAddress = "<JETTON_WALLET_ADDR>";
+const jettonWallet = new TonWeb.token.jetton.JettonWallet(tonweb.provider, { address: walletAddress });
+(async () => {
+ const data = await jettonWallet.getData();
+ console.log('jetton balance:', data.balance.toString());
+ console.log('jetton owner address:', data.ownerAddress.toString(true, true, true));
+ // It is important to verify that the jetton master recognizes the wallet
+ const JettonMinter = new TonWeb.token.jetton.JettonMinter(tonweb.provider, { address: data.JettonMinterAddress.toString(false) });
+ const expectedjettonWalletAddress = await JettonMinter.getJettonWalletAddress(data.ownerAddress.toString(false));
+ if (expectedjettonWalletAddress.toString(false) !== new TonWeb.utils.Address(walletAddress).toString(false)) {
+ throw new Error('jetton minter does not recognize the wallet');
+ }
+ console.log('jetton master address:', data.JettonMinterAddress.toString(true, true, true));
+})(); Define placeholders (first use): [HIGH] Unofficial external API link instead of canonical internal referenceLocation:
Description: Suggestion: -Finally, you can get this information using the [API](https://companyname-a7d5b98e.mintlify.app/api-reference/jettons/get-jetton-wallets).
+Finally, you can get this information using the [API](/api-reference/jettons/get-jetton-wallets). |
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 also fix the relevant AI comments
This comment was marked as resolved.
This comment was marked as resolved.
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.
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.
We need a formatter for our code snippets, but let's do that in separate PR
To fix the formatting issues:
npx remark -o --silent --silently-ignore standard/tokens/jettons/how-to-get-wallet-data.mdx standard/tokens/jettons/mintless/how-to-deploy.mdx |
Closes #218