Skip to content

Commit

Permalink
clarification for actions limits (#882)
Browse files Browse the repository at this point in the history
* clarification for actions max number

* update to final text

* little fix
  • Loading branch information
Alexey-Ostrovsky authored Nov 30, 2024
1 parent d30f55f commit 4d9605b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/v3/documentation/tvm/tvm-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ Besides exit_code and consumed gas data, TVM indirectly outputs the following da

All other register values will be neglected.

Note, that since there is a limit on max cell-depth `<1024`, and particularly the limit on c4 and c5 depth `<=512`, there will be a limit on the number of output actions in one tx `<=255`. If a contract needs to send more than that, it may send a message with the request `continue_sending` to itself and send all necessary messages in subsequent transactions.
Note that there is a global limit on max cell-depth `<1024` during contract execution. However registers c4 and c5 must be `<=512` in depth. Going beyond these limits results an error at the end of compute phase.
An additional constraint is imposed in the action phase. A contract cannot create more than 255 output actions.

:::tip
If a contract wants to send more than 255 messages, it can do so by sending a message to itself, which will contain the request of sending the remaining messages. An example of this approach can be seen at https://github.com/ton-blockchain/highload-wallet-contract-v3/blob/main/contracts/highload-wallet-v3.func#L50.
:::


## See Also
Expand Down

0 comments on commit 4d9605b

Please sign in to comment.