Skip to content

Commit 8e7adc1

Browse files
upd
1 parent 1e3d901 commit 8e7adc1

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/v3/guidelines/dapps/cookbook.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ Don't forget that the comment message in a snake cell has 32 zero bits (i.e., it
500500

501501
### How to calculate the user's jetton wallet address (offchain)?
502502

503-
To calculate a users jetton wallet address, use the `get_wallet_address` method from the jetton master contract with the user's address. You can also call the master contract directly, or use the getWalletAddress method provided in the JettonMaster SDK.
503+
To calculate a user's jetton wallet address, use the `get_wallet_address` method from the jetton master contract with the user's address. You can also call the master contract directly, or use the getWalletAddress method provided in the JettonMaster SDK.
504504

505505
:::info
506506
The `JettonMaster` in `@ton/ton` provides this functionality, although it lacks other features.
@@ -623,7 +623,10 @@ For example, using Tonviewer, you can get the jetton master contract address (e.
623623
b5ee9c72010101010023000842020f1ad3d8a46bd283321dde639195fb72602e9b31b1727fecc25e2edc10966df4
624624
```
625625

626-
Knowing the jetton wallet code and its storage structure, you can manually compute the wallet address.
626+
Knowing the jetton wallet code and its storage structure, you can manually compute the wallet address.
627+
For some tokens, you'll need to find additional parameters.
628+
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).
629+
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`.
627630

628631
<Tabs groupId="code-examples">
629632
<TabItem value="js-ton" label="JS (@ton/ton)">
@@ -1039,7 +1042,7 @@ Next, we need to correctly calculate the total transaction cost. The value of `0
10391042

10401043
### How to change the owner of a collection's smart contract?
10411044

1042-
Changing the owner of a collection is simple. Specify the opcode = 3, any query_id, and the new owners address.
1045+
Changing the owner of a collection is simple. Specify the opcode = 3, any query_id, and the new owner's address.
10431046

10441047

10451048
<Tabs groupId="code-examples">
@@ -1247,7 +1250,7 @@ main().finally(() => console.log("Exiting..."));
12471250
</TabItem>
12481251
</Tabs>
12491252

1250-
When updating NFT metadata or content, royalty information must also be included, especially when using the appropriate opcode to modify this data. Its important to remember that you dont need to update all values if only certain elements are changing. For instance, if the only change is to the NFT common content, the other data remains the same and can be reused without modification.
1253+
When updating NFT metadata or content, royalty information must also be included, especially when using the appropriate opcode to modify this data. It's important to remember that you don't need to update all values if only certain elements are changing. For instance, if the only change is to the NFT common content, the other data remains the same and can be reused without modification.
12511254

12521255
## Third-party: decentralized exchanges (DEX)
12531256

@@ -1291,7 +1294,7 @@ This information is sufficient to construct the swap message.
12911294

12921295
<TabItem value="js-ton" label="JS (@ton)">
12931296
DEXs use different protocols for their work, we need to familiarize ourselves with key concepts and some vital components and also know the TL-B schema involved in doing our swap process correctly. In this tutorial, we deal with DeDust, one of the famous DEX implemented entirely in TON.
1294-
DeDust introduced an abstract Asset concept, which includes any swappable asset type, simplifying the process because the type of asset doesnt matter in the swap. This abstraction allows the exchange of extra currency or even assets from other chains in a straightforward manner.
1297+
DeDust introduced an abstract Asset concept, which includes any swappable asset type, simplifying the process because the type of asset doesn't matter in the swap. This abstraction allows the exchange of extra currency or even assets from other chains in a straightforward manner.
12951298

12961299
Following is the TL-B schema that DeDust introduced for the Asset concept.
12971300

0 commit comments

Comments
 (0)