Skip to content

Commit 7381d93

Browse files
Update cookbook.mdx
1 parent 6e98574 commit 7381d93

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

docs/v3/guidelines/dapps/cookbook.mdx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,9 @@ asyncio.run(main())
620620
Although it is a common approach, [calling the GET method](/v3/guidelines/smart-contracts/get-methods#calling-get-methods-from-code) every time to retrieve the wallet address can be slow and resource-intensive.
621621
However, if you know the jetton wallet code and storage structure, you can calculate the wallet address without making network requests.
622622

623-
624-
<Tabs groupId="code-examples">
625-
<TabItem value="example" label="Example">
626-
623+
<details>
624+
<summary>Conceptual example</summary>
625+
627626
Using Tonviewer, you can get the jetton master contract address, for example `EQAJ8uWd7EBqsmpSWaRdf_I-8R8-XHwh3gsNKhy-UrdrPcUo`.
628627
If we [go to this address](https://tonviewer.com/EQAJ8uWd7EBqsmpSWaRdf_I-8R8-XHwh3gsNKhy-UrdrPcUo?section=method) and open the Methods tab, we can see that there is already a `get_jetton_data` method there.
629628
By calling it, we can get the hex form of the cell with the jetton wallet code:
@@ -693,12 +692,12 @@ async function main() {
693692

694693
main();
695694
```
695+
</details>
696696

697-
</TabItem>
698-
699-
<TabItem value="js-ton" label="JS (@ton/ton)">
697+
<Tabs groupId="code-examples">
698+
<TabItem value="ts-ton" label="TS (@ton/ton)">
700699

701-
```js
700+
```ts
702701
import { Cell, contractAddress, toNano, TupleBuilder } from "@ton/core";
703702
import { ContractProvider, Address, Contract, Sender, StateInit } from "@ton/core";
704703
import { Blockchain, createShardAccount } from "@ton/sandbox";
@@ -779,7 +778,7 @@ void main();
779778
<TabItem value="Python" label="Python">
780779

781780
Unfortunately, there is currently no tool like Sandbox for Python to emulate the blockchain.
782-
However, you can still refer to this example and the `Example` tab to understand how to correctly construct the data needed to obtain the address.
781+
However, you can still refer to this example and the `Conceptual example` spoiler to understand how to correctly construct the data needed to obtain the address.
783782

784783
```python
785784

0 commit comments

Comments
 (0)