Skip to content

feat(contract-dev): edit jetton processing guide to fit style guide.#2125

Open
kay-is wants to merge 2 commits intomainfrom
jetton-processing-style
Open

feat(contract-dev): edit jetton processing guide to fit style guide.#2125
kay-is wants to merge 2 commits intomainfrom
jetton-processing-style

Conversation

@kay-is
Copy link
Copy Markdown
Collaborator

@kay-is kay-is commented Apr 23, 2026

Closes #2117.

Summary by CodeRabbit

  • Documentation
    • Reorganized Jetton processing into three verification approaches for clearer comparison
    • Emphasized that any sender can issue JettonNotify and expanded the threat diagram to show an attacker
    • Rewrote manual and automatic wallet-management guides with new sequence diagrams and clearer setup/initialization flows
    • Renamed and reframed on-chain get-method emulation with new guidance and examples for different minter types

Copilot AI review requested due to automatic review settings April 23, 2026 15:13
@kay-is kay-is requested a review from a team as a code owner April 23, 2026 15:13
@mintlify
Copy link
Copy Markdown

mintlify Bot commented Apr 23, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify-ton-docs 🟢 Ready View Preview Apr 23, 2026, 3:14 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fa0d2406-6a04-4c89-8482-ee4ee08b6b3c

📥 Commits

Reviewing files that changed from the base of the PR and between 5b24554 and 4f98a1d.

📒 Files selected for processing (1)
  • contract-dev/techniques/on-chain-jetton-processing.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • contract-dev/techniques/on-chain-jetton-processing.mdx

📝 Walkthrough

Walkthrough

Rewrote the on-chain jetton processing doc into a three-approach comparison: manual wallet management, automatic wallet discovery (TEP-89), and on-chain get-method emulation. Intro and threat diagram updated to emphasize verifying the jetton wallet; multiple sequence diagrams and callouts added or refactored.

Changes

Cohort / File(s) Summary
Core documentation
contract-dev/techniques/on-chain-jetton-processing.mdx
Reorganized content from a 2-section layout to a 3-approach comparison. Intro and threat diagram updated to stress sender verification. Rewrote Manual wallet management, Automatic wallet discovery, and Get-method emulation sections; adjusted headings, callouts, code fence labels, and step/argument examples.
Sequence and examples (doc-level assets)
contract-dev/techniques/on-chain-jetton-processing.mdx (sequence diagrams, example snippets)
Added/updated sequence diagrams for manual management, automatic discovery, and get-method emulation flows; refactored examples and step formatting (including InitContract, Provide/TakeWalletAddress, SetTrustedJettonWallet).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through lines of docs today,
Rearranged the paths where jettons play,
Diagrams stitched, callouts bright and new,
A tidy guide — from one rabbit to you. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: editing the jetton processing guide to align with the project's style guide, which matches the PR's core objective.
Linked Issues check ✅ Passed The PR successfully addresses issue #2117 by revising the jetton processing documentation to conform with the project's style guide, as evidenced by the restructured content and reformatted sections.
Out of Scope Changes check ✅ Passed All changes are focused on restructuring and reformatting the jetton processing guide to align with style guide requirements; no unrelated modifications are introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jetton-processing-style

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@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 detailed improvements in contract-dev/techniques/on-chain-jetton-processing.mdx; I’ve left a couple of suggestions to tighten the grammar and make the instructional language more direct—please apply the inline suggestions.

Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@contract-dev/techniques/on-chain-jetton-processing.mdx`:
- Line 12: The sentence contains a typo "a  contracts must verify" in the
JettonNotify warning; update the wording to be grammatically correct and clear
(e.g., change to "a contract must verify" or "contracts must verify") so the
security note about verifying that a JettonNotify comes from the correct jetton
wallet address reads cleanly; ensure the terms JettonNotify and jetton wallet
address remain unchanged.
- Line 101: The phrase saying a jetton wallet "shares an owner" with the
receiving contract is inaccurate; update the wording around
SetTrustedJettonWallet to state that the trusted jetton wallet must be the
jetton wallet derived for the receiving contract's address (i.e., the jetton
wallet whose owner is the receiving contract address), not the contract's
admin/owner, and replace the ambiguous language with this precise explanation
and a link/reference to the TON Docs find jetton wallet procedure.
- Around line 223-224: The wording is inaccurate: TEP-89 defines internal
messages named provide_wallet_address and take_wallet_address (not get-methods),
so update the sentence to say "TEP-89 defines the internal messages
provide_wallet_address and take_wallet_address" and change any "get-methods"
reference to "internal messages"; also correct agreement from "platform such as
DeDust only allows them" to plural "platforms such as DeDust only allow them" to
match plural "platforms".
- Around line 119-121: The InitContract flow must attach enough TON to fund the
TEP-89 response so the minter can call take_wallet_address; update the
docs/examples around InitContract and the ProvideWalletAddress call (which uses
SEND_MODE_CARRY_ALL_REMAINING_MESSAGE_VALUE) to explicitly state and show that
sufficient value is included, otherwise take_wallet_address will fail and
jettonWalletAddress remains unset; reference InitContract, ProvideWalletAddress,
take_wallet_address, jettonWalletAddress and TEP-89 in the clarification so
readers know where to add the funds.
- Around line 22-29: The table row labeled "TEP-89 compatibility" should be
renamed to something like "TEP-89 required" or "Requires TEP-89" to avoid
implying incompatibility, and update the three column values so they indicate
whether the approach requires TEP-89 (e.g., Manual management: No, Automatic
discovery: Yes, Get-method emulation: No); update any adjacent explanatory text
in the sections "Manual management", "Automatic discovery", and "Get-method
emulation" to clarify that TEP-89-compatible jettons can still be used with the
first and third approaches even though they don’t require TEP-89.
- Around line 279-288: Update the wording around validating StateInit in the
JettonNotify flow to clarify that hashing a supplied StateInit only proves the
initial state (not necessarily the current code/data used by
get_wallet_address/calculateJettonWallet) and therefore this low-trust path must
require a current-state proof (or on-chain proof of code/data) unless the guide
explicitly states the minter is immutable; mention JettonNotify, StateInit,
jettonMinter, get_wallet_address and calculateJettonWallet by name and add a
short note linking to TON upgrade/address derivation concepts so readers know to
require a current state proof when they don’t control the minter.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7aa9e7a2-bad2-490c-8389-cdd2cdbfcc95

📥 Commits

Reviewing files that changed from the base of the PR and between 1f92393 and 5b24554.

📒 Files selected for processing (1)
  • contract-dev/techniques/on-chain-jetton-processing.mdx

Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the “On-chain jetton processing” technique doc to better match the documentation style guide (closes #2117), including callout formatting, restructured sections, and refreshed diagrams.

Changes:

  • Standardizes callouts using <Aside type="..."> and rewrites the intro for clearer guidance.
  • Reorganizes the content into three verification approaches with a comparison table.
  • Replaces/updates diagrams and code block titles to improve readability.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx Outdated
Comment thread contract-dev/techniques/on-chain-jetton-processing.mdx
@kay-is kay-is marked this pull request as ready for review April 24, 2026 09:24
Comment on lines 1 to 3
---
title: "On-chain Jetton processing"
title: "On-chain jetton processing"
sidebarTitle: "Jetton processing"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[HIGH] Page title lowercases proper noun “Jetton”

In the frontmatter, the updated title uses “On-chain jetton processing”, which lowercases “Jetton” even though it is treated as a canonical proper noun in the docs and terminology. This violates the style guide’s requirement to preserve capitalization for named standards and branded terms while otherwise using sentence case for headings. Keeping “Jetton” capitalized in the page title preserves consistency with the terminology section and with other occurrences in this document.

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

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for the updates in contract-dev/techniques/on-chain-jetton-processing.mdx: I’ve left a couple of suggestions, so please apply the inline suggestions to polish the title and example code.


Per-comment submission: 1 posted, 1 failed.

Unposted inline comments (raw text):

  • contract-dev/techniques/on-chain-jetton-processing.mdx:L62-L64

    [HIGH] Tolk code block missing semicolons

    The Storage.save example in this Tolk code block omits the terminating semicolon on the return contract.setData(self.toCell()) line. This makes the example syntactically invalid and not directly copy‑pasteable into a Tolk environment. Documentation examples are expected to be runnable as shown, so the missing semicolon degrades developer experience and can cause confusion or compilation errors when copied verbatim.

    fun Storage.save(self) {  …(truncated)
    

@kay-is kay-is requested a review from aigerimu April 24, 2026 14:50
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.

[Contract dev > Techniques > Onchain Jetton processing] put in agreement with styleguide

2 participants