Skip to content

Commit 460bb42

Browse files
authored
Merge branch 'ton-community:main' into func_debug_primitives
2 parents c6488c0 + 506ea8b commit 460bb42

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

docs/develop/dapps/apis/sdk.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ There are different ways to connect to blockchain:
3939
|[TonTools](https://github.com/yungwine/TonTools)|via RPC ([Orbs](https://www.orbs.com/ton-access/) / [Toncenter](https://toncenter.com/api/v2/) / etc)|TonTools is a high-level OOP library for Python, which can be used to interact with TON Blockchain.|
4040
|[tonpy](https://github.com/disintar/tonpy)|Native ADNL| Python package that provides data structures and API to interact with TON blockchain. |
4141
|[tvm_valuetypes](https://github.com/toncenter/tvm_valuetypes)|*offchain-only*| library is collection of utilits for handling TVM types. |
42-
|[pytvm](https://github.com/yungwine/pytvm) | *offchain*, Tonlib | Python TVM emulator using bindings to C++ standard emulator |
42+
|[pytvm](https://github.com/yungwine/pytvm) | *offchain* | Python TVM emulator using bindings to C++ standard emulator |
4343

4444

4545
### C#

docs/develop/func/stdlib.mdx

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -475,20 +475,38 @@ Similar to `raw_reserve` but also accepts a dictionary `extra_amount` (represent
475475

476476
Sends a raw message contained in `msg`, which should contain a correctly serialized object Message X, with the only exception that the source address is allowed to have a dummy value `addr_none` (to be automatically replaced with the current smart contract address), and `ihr_fee`, `fwd_fee`, `created_lt` and `created_at` fields can have arbitrary values (to be rewritten with correct values during the action phase of the current transaction). The integer parameter `mode` contains the flags.
477477

478-
There are currently 3 Modes and 3 Flags for messages. You can combine a single mode with several (maybe none) flags to get a required `mode`. Combination simply means getting sum of their values. A table with descriptions of Modes and Flags is given below.
478+
There are currently 3 Modes and 4 Flags for messages. You can combine a single mode with several (maybe none) flags to get a required `mode`. Combination simply means getting sum of their values. A table with descriptions of Modes and Flags is given below.
479479

480480
| Mode | Description |
481481
| :---- | :--------------------------------------------------------------------------------------------------------------------- |
482482
| `0` | Ordinary message |
483483
| `64` | Carry all the remaining value of the inbound message in addition to the value initially indicated in the new message |
484484
| `128` | Carry all the remaining balance of the current smart contract instead of the value originally indicated in the message |
485485

486-
| Flag | Description |
487-
| :---- | :-------------------------------------------------------------------------------------------- |
488-
| `+1` | Pay transfer fees separately from the message value |
489-
| `+2` | Ignore any errors arising while processing this message during the action phase |
490-
| `+16` | In the case of action fail - bounce transaction. No effect if `+2` is used. |
491-
| `+32` | Current account must be destroyed if its resulting balance is zero (often used with Mode 128) |
486+
| Flag | Description |
487+
| :---- | :---------------------------------------------------------------------------------------------------------------- |
488+
| `+1` | Pay transfer fees separately from the message value |
489+
| `+2` | Ignore some errors arising while processing this message during the action phase (check note below) |
490+
| `+16` | In the case of action fail - bounce transaction. No effect if `+2` is used. |
491+
| `+32` | Current account must be destroyed if its resulting balance is zero (often used with Mode 128) |
492+
493+
:::info +2 flag
494+
Note that `+2` flag ignore only following errors arising while processing message during the action phase:
495+
1. Not enough Toncoins:
496+
- Not enough value to transfer with the message (all of the inbound message value has been consumed).
497+
- Not enough funds to process a message.
498+
- Not enough value attached to the message to pay forwarding fees.
499+
- Not enough extra currency to send with the message.
500+
- Not enough funds to pay for an outbound external message.
501+
2. Message is too large (check [Message size](/develop/smart-contracts/messages#message-size) for more).
502+
3. The message has too big Merkle depth.
503+
504+
However, it does not ignore errors in the following scenarios:
505+
1. The message has an invalid format.
506+
2. The message mode includes both 64 and 128 mods.
507+
3. The outbound message has invalid libraries in StateInit.
508+
4. The external message is not ordinary or includes +16 or +32 flag or both.
509+
:::
492510

493511
For example, if you want to send a regular message and pay transfer fees separately, use the Mode `0` and Flag `+1` to get `mode = 1`. If you want to send the whole contract balance and destroy it immidiately, use the Mode `128` and Flag `+32` to get `mode = 160`.
494512

0 commit comments

Comments
 (0)