Skip to content

Update offline calculations #1064

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Update offline calculations #1064

wants to merge 6 commits into from

Conversation

memearchivarius
Copy link
Contributor

Description

Update the TypeScript example for offline address calculations in the TON Cookbook to support modern Jetton wallet standards.

Closes #1063.

Checklist

  • I have created an issue.
  • I am working on content that aligns with the Style guide.
  • I have reviewed and formatted the content according to Content standardization.
  • I have reviewed and formatted the text in the article according to Typography.

@reveloper reveloper added the guidelines Develop a new tutorial label Mar 31, 2025
@memearchivarius
Copy link
Contributor Author

@skywardboundd, could you review the updated version of this section? We worked on it together with @Shvandre.

Knowing the jetton wallet code and its storage structure, you can manually compute the wallet address.
For some tokens, you'll need to find additional parameters.
For example, for Hamster Kombat, you need to know the merkle root used by mintless wallets and the salt used for [predictable sharding](https://docs.ton.org/v3/guidelines/smart-contracts/howto/shard-optimization/#how-to-deploy-a-contract-to-a-specific-shard).
You can obtain the salt for an existing address using the jetton master's `get_wallet_state_init_and_salt` get-method and the merkle hash using `get_mintless_airdrop_hashmap_root`.

Choose a reason for hiding this comment

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

It seems like we’re aiming for offline computations, yet in the example we still call a get-method get_wallet_state_init_and_salt for each address.

Maybe we should either avoid using HAMSTER as the example, or rewrite the calculation function to work fully offline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidelines Develop a new tutorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix jetton offline calculation example
3 participants