-
Notifications
You must be signed in to change notification settings - Fork 338
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
base: main
Are you sure you want to change the base?
Conversation
363a129
to
4bf48dd
Compare
@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`. |
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.
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.
Description
Update the TypeScript example for offline address calculations in the TON Cookbook to support modern Jetton wallet standards.
Closes #1063.
Checklist