Skip to content

Commit

Permalink
MMC Update dark scheme and other 2 page repaire (#959)
Browse files Browse the repository at this point in the history
* MMC Update

* 2 pages Update

* Latest update - delete hatching
  • Loading branch information
AiramGol authored Feb 17, 2025
1 parent ad6c18d commit ec4f94d
Show file tree
Hide file tree
Showing 56 changed files with 193 additions and 4,300 deletions.
4 changes: 2 additions & 2 deletions docs/v3/contribute/content-standardization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ If the transaction order isn't essential, omit their labels. This approach simpl
<ThemedImage
alt=""
sources={{
light: '/img/docs/scheme-templates/message-processing-graphs/Graphic-Explanations-Guidelines_1.svg?raw=true',
dark: '/img/docs/scheme-templates/message-processing-graphs/Graphic-Explanations-Guidelines_1_dark.svg?raw=true',
light: '/img/docs/scheme-templates/message-processing-graphs/Graphic-Explanations-Guidelines_1.png?raw=true',
dark: '/img/docs/scheme-templates/message-processing-graphs/Graphic-Explanations-Guidelines_1_dark.png?raw=true',
}}
/>
<br></br>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import ConceptImage from '@site/src/components/conceptImage';
import ThemedImage from '@theme/ThemedImage';

# Message Modes Cookbook

Understanding the different modes and flags available for sending messages is crucial to ensure that your smart contracts behave as intended.
Expand Down Expand Up @@ -62,7 +65,18 @@ State before transaction: Account A has 1 TON, Account B has 1 TON

State after transaction: Account A has 0.9 TON, Account B has 1.096 TON

![](/img/docs/message-modes-cookbook/send_regular_message_1.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/send_regular_message_1.png?raw=true',
dark: '/img/docs/message-modes-cookbook/send_regular_message_1_dark.png?raw=true',
}}
/>
</div>
<br></br>


| Mode and Flags | Code |
| :-------------------- | :------------------------- |
Expand All @@ -81,7 +95,17 @@ State after transaction: Account A has 0.9 TON, Account B has 1.096 TON
If no errors occur, the result is the same as [`mode = 0`](#1-send-a-regular-message).
:::

![](/img/docs/message-modes-cookbook/send_regular_message_2.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/send_regular_message_2.png?raw=true',
dark: '/img/docs/message-modes-cookbook/send_regular_message_2_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :--------------------- | :------------------------- |
Expand All @@ -96,13 +120,33 @@ In case of an error during [action phase](https://retracer.ton.org/?tx=e9dccba82

State after transaction with error: Account A has 1 - ([total_fee](/v3/documentation/smart-contracts/transaction-fees/fees#basic-fees-formula) + `fwd_fee`) TON, Account B has 1 TON

![](/img/docs/message-modes-cookbook/send_regular_message_3_error.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/send_regular_message_3_error.png?raw=true',
dark: '/img/docs/message-modes-cookbook/send_regular_message_3_error_dark.png?raw=true',
}}
/>
</div>
<br></br>

:::info tip
If no errors occur the result is the same as [`mode = 0`](#1-send-a-regular-message).
:::

![](/img/docs/message-modes-cookbook/send_regular_message_3_noerror.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/send_regular_message_3_noerror.png?raw=true',
dark: '/img/docs/message-modes-cookbook/send_regular_message_3_noerror_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :---------------------- | :-------------------------- |
Expand All @@ -116,7 +160,17 @@ State before the transaction: Account A has 1 TON, Account B has 1 TON

State after the transaction: Account A has 0.896 TON, Account B has 1.1 TON

![](/img/docs/message-modes-cookbook/send_regular_message_4.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/send_regular_message_4.png?raw=true',
dark: '/img/docs/message-modes-cookbook/send_regular_message_4_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :--------------------- | :------------------------- |
Expand All @@ -131,13 +185,33 @@ In case of an error [during action phase](https://retracer.ton.org/?tx=e9dccba82

State after the transaction with an error: Account A has 1 - ([total_fee](/v3/documentation/smart-contracts/transaction-fees/fees#basic-fees-formula) + `fwd_fee`) TON, Account B has 1 TON

![](/img/docs/message-modes-cookbook/send_regular_message_5_error.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/send_regular_message_5_error.png?raw=true',
dark: '/img/docs/message-modes-cookbook/send_regular_message_5_error_dark.png?raw=true',
}}
/>
</div>
<br></br>

:::info tip
If no errors occur the result is the same as [`mode = 1`](#4-send-a-regular-message-with-separate-fees).
:::

![](/img/docs/message-modes-cookbook/send_regular_message_5_noerror.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/send_regular_message_5_noerror.png?raw=true',
dark: '/img/docs/message-modes-cookbook/send_regular_message_5_noerror_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :------------------------------- | :-------------------------- |
Expand All @@ -162,7 +236,17 @@ Please note that `SENDRAWMSG` doesn't update balance.
If you try to send multiple messages (i.e. mode 0 **and** mode 64) you'll get exit code 37.
:::

![](/img/docs/message-modes-cookbook/carry_remaining_value_6.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_6.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_6_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :--------------------- | :-------------------------- |
Expand All @@ -181,7 +265,17 @@ You might check [this example](https://testnet.tonviewer.com/transaction/ad93e78
Please note that `storage_fee` is included in `total_fee` but it is always paid from contract `balance`.
:::

![](/img/docs/message-modes-cookbook/carry_remaining_value_7.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_7.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_7_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :---------------------- | :-------------------------- |
Expand All @@ -196,13 +290,33 @@ In case of an error during the action phase, the message will bounce and `total_

State after the transaction with an error: Account A has 1 - (total_fee + `fwd_fee`) TON, Account B has 1 TON, Account C has 1 TON

![](/img/docs/message-modes-cookbook/carry_remaining_value_8_error.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_8_error.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_8_error_dark.png?raw=true',
}}
/>
</div>
<br></br>

:::info tip
If no errors occur the result is the same as [`mode = 64`](#6-carry-remaining-value-with-new-message). This mode is widely used in TON for jetton transfers. You can [check it in C5 action list](https://retracer.ton.org/?tx=6489d60d9197c0be7ee64b0812139d82221e8f94c6e378c356acc10f9067310c) of the jetton wallet.
:::

![](/img/docs/message-modes-cookbook/carry_remaining_value_8_noerror.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_8_noerror.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_8_noerror_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :----------------------- | :-------------------------- |
Expand All @@ -217,13 +331,33 @@ In case of an error during the action phase, the message will bounce and `total_

State after transaction with an error: Account A has 1 - (total_fee + `fwd_fee`) TON, Account B has 1 TON, Account C has 1 TON

![](/img/docs/message-modes-cookbook/carry_remaining_value_9_error.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_9_error.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_9_error_dark.png?raw=true',
}}
/>
</div>
<br></br>

:::info tip
If no errors occur the result is the same as [`mode = 65`](#7-carry-remaining-value-with-new-message-with-separate-fees).
:::

![](/img/docs/message-modes-cookbook/carry_remaining_value_9_noerror.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_9_noerror.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_9_noerror_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :--------------------------- | :-------------------------- |
Expand All @@ -237,7 +371,17 @@ State before the transaction: Account A has 1 TON, Account B has 1 TON, Account

State after the transaction: Account A has 0.896 TON, Account B has 0 TON, Account C has 2.1 - (total_fee + `fwd_fee`) TON

![](/img/docs/message-modes-cookbook/carry_remaining_value_10.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_10.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_10_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :---------------------- | :--------------------------- |
Expand All @@ -251,13 +395,33 @@ State before the transaction: Account A has 1 TON, Account B has 1 TON, Account

State after the transaction with an error: Account A has 1 - (total_fee + `fwd_fee`) TON, Account B has 1 TON, Account C has 1 TON

![](/img/docs/message-modes-cookbook/carry_remaining_value_11_error.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_11_error.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_11_error_dark.png?raw=true',
}}
/>
</div>
<br></br>

:::info tip
If no errors occur the result is the same as [`mode = 128`](#10-send-all-received-tokens-together-with-the-contract-balance). This mode is widely used in TON for jetton transfers, you can [check it in C5 action list](https://retracer.ton.org/?tx=e4f31e37eec74a8cfcecdad9246a6bbf3da20c4edb3635150cb0fa54b9def558) of the jetton wallet.
:::

![](/img/docs/message-modes-cookbook/carry_remaining_value_11_noerror.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_11_noerror.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_11_noerror_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :------------------------ | :--------------------------- |
Expand All @@ -273,7 +437,17 @@ State after the transaction: Account A has 0.896 TON, Account B has 0 TON and `n

When the balance reaches 0 TON, destroy the contract.

![](/img/docs/message-modes-cookbook/carry_remaining_value_12.png)
<br></br>
<div class="text--center">
<ThemedImage
alt=""
sources={{
light: '/img/docs/message-modes-cookbook/carry_remaining_value_12.png?raw=true',
dark: '/img/docs/message-modes-cookbook/carry_remaining_value_12_dark.png?raw=true',
}}
/>
</div>
<br></br>

| Mode and Flags | Code |
| :------------------------ | :--------------------------- |
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit ec4f94d

Please sign in to comment.