You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/v3/guidelines/dapps/cookbook.mdx
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -500,7 +500,7 @@ Don't forget that the comment message in a snake cell has 32 zero bits (i.e., it
500
500
501
501
### How to calculate the user's jetton wallet address (offchain)?
502
502
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.
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.
504
504
505
505
:::info
506
506
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.
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`.
627
630
628
631
<TabsgroupId="code-examples">
629
632
<TabItemvalue="js-ton"label="JS (@ton/ton)">
@@ -1039,7 +1042,7 @@ Next, we need to correctly calculate the total transaction cost. The value of `0
1039
1042
1040
1043
### How to change the owner of a collection's smart contract?
1041
1044
1042
-
Changing the owner of a collection is simple. Specify the opcode = 3, any query_id, and the new owner’s address.
1045
+
Changing the owner of a collection is simple. Specify the opcode = 3, any query_id, and the new owner's address.
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.
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.
1251
1254
1252
1255
## Third-party: decentralized exchanges (DEX)
1253
1256
@@ -1291,7 +1294,7 @@ This information is sufficient to construct the swap message.
1291
1294
1292
1295
<TabItemvalue="js-ton"label="JS (@ton)">
1293
1296
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 doesn’t 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.
1295
1298
1296
1299
Following is the TL-B schema that DeDust introduced for the Asset concept.
0 commit comments