Skip to content

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

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

feat(contract-dev): edit jetton processing guide to fit style guide.#2125
kay-is wants to merge 4 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 with a comparison table
    • Expanded threat model to include an explicit attacker and highlighted sender verification requirements
    • Rewrote manual and TEP-89 initialization flows with new sequence diagrams and multi-wallet guidance
    • Renamed/reframed on-chain get-method emulation and added examples for different minter scenarios

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: 889ef350-4a8c-4919-9561-dc11fb449f21

📥 Commits

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

📒 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

Reframes the on-chain jetton processing doc around verification of JettonNotify senders. Adds an explicit attacker in the threat model, reorganizes into three approaches (manual wallet management, TEP-89 automatic discovery, on-chain get-method emulation), and updates sequence diagrams, examples, and guidance for wallet verification flows.

Changes

Cohort / File(s) Summary
Core doc
contract-dev/techniques/on-chain-jetton-processing.mdx
Rewritten structure: replaces prior trusted/unknown sections with a three-approach comparison; introduces explicit attacker in threat model; reframes verification requirement for JettonNotify sender; updates headings, callouts, and example argument formatting.
Flows & examples
contract-dev/techniques/on-chain-jetton-processing.mdx (sequence diagrams, code snippets)
Added/updated sequence diagrams for Manual wallet management, TEP-89 (InitContract / ProvideWalletAddress / TakeWalletAddress), and On-chain get-method emulation; refactored helper code labels and renamed sub-approaches (vanity vs non-vanity minters); adjusted Storage/SetTrustedJettonWallet guidance to support multiple trusted wallets and minter-scoped instances.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I nudged the docs with careful paws,
Verified senders and tightened the laws,
Diagrams hopped in, steps neat and spry,
A tiny guide under a big blue sky. 🥕

🚥 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 reflects the main change: editing the jetton processing guide to conform with the project's style guide.
Linked Issues check ✅ Passed The PR successfully addresses issue #2117 by revising the guide to conform with the style guide requirements, including content restructuring, improved headings, and added comparison table.
Out of Scope Changes check ✅ Passed All changes are scoped to the single documentation file and directly support the style guide conformance objective; no out-of-scope modifications detected.
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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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 thread contract-dev/techniques/on-chain-jetton-processing.mdx
@github-actions

This comment was marked as off-topic.

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

imho, making the headings more accessible for a broader audience is a good idea, but they become too broad and lose important specificity

@kay-is
Copy link
Copy Markdown
Collaborator Author

kay-is commented Apr 30, 2026

imho, making the headings more accessible for a broader audience is a good idea, but they become too broad and lose important specificity

@aigerimu Fair. I added a comparison table with section links at the beginning to account for specificity.

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

3 participants