Send Mode
Bit-flag attached to an outgoing TON message that controls how it is sent: who pays the fee, whether to bounce on failure, whether to destroy the contract afterwards.
Aliases: send-mode, sendmode, mode flag
Send Mode is the set of bit-flags a TVM contract attaches to every outgoing message. The mode controls who pays the forwarding fee, what happens on error, and whether the contract should be destroyed after the action.
Common values
In FunC and Tact the standard modes are integers 0–128 or their bitwise OR:
| Mode | Value | Effect |
|---|---|---|
0 | NORMAL | Fee deducted from the value attached to the message. |
1 | PAY_GAS_SEPARATELY | Fee deducted from the contract’s own balance, not the transfer amount. |
2 | IGNORE_ERRORS | A failure to send will not abort the whole action phase. |
64 | CARRY_REMAINING_VALUE | Forward all “remaining” value of the incoming message. |
128 | CARRY_REMAINING_BALANCE | Forward the entire contract balance (used in self-destruct). |
32 | DESTROY_IF_ZERO | Destroy the contract if its balance drops to zero. |
These flags combine: 64 + 2 (66) is a typical mode for a proxy contract that forwards everything onward and refuses to abort half-way.
Why it matters
Send Mode is the main lever for controlling gas and money flow on TON. Mistakes here are a common source of bugs:
- Empty contract. Mode
128sweeps the whole balance, including the storage deposit. - Stuck transaction. Mode
0with insufficient attached value leads to a fee shortfall and a hanging exit code. - Broken message chain. Without the
2flag, a failure in one sub-message wipes out the rest.
Most libraries (Tonkeeper SDK, Tact stdlib) expose these constants under readable names; assembling the integer by hand is rarely necessary.