You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/GlobalVersions.md
+16-12
Original file line number
Diff line number
Diff line change
@@ -58,23 +58,27 @@ See [this post](https://t.me/tonstatus/88) for details.
58
58
## Version 6
59
59
60
60
### c7 tuple
61
-
**c7** tuple extended from 14 to 15 elements. The new element is a tuple that contains some config parameters as cell slices.
62
-
If the parameter is absent from the config, the value is null.
63
-
***0**: `StoragePrices` from `ConfigParam 18`. Not the whole dict, but only the one StoragePrices entry (one which corresponds to the current time).
64
-
***1**: `ConfigParam 19` (global id).
65
-
***2**: `ConfigParam 20` (mc gas prices).
66
-
***3**: `ConfigParam 21` (gas prices).
67
-
***4**: `ConfigParam 24` (mc fwd fees).
68
-
***5**: `ConfigParam 25` (fwd fees).
69
-
***6**: `ConfigParam 43` (size limits).
61
+
**c7** tuple extended from 14 to 16 elements:
62
+
***14**: tuple that contains some config parameters as cell slices. If the parameter is absent from the config, the value is null. Asm opcode: `UNPACKEDCONFIGTUPLE`.
63
+
***0**: `StoragePrices` from `ConfigParam 18`. Not the whole dict, but only the one StoragePrices entry (one which corresponds to the current time).
64
+
***1**: `ConfigParam 19` (global id).
65
+
***2**: `ConfigParam 20` (mc gas prices).
66
+
***3**: `ConfigParam 21` (gas prices).
67
+
***4**: `ConfigParam 24` (mc fwd fees).
68
+
***5**: `ConfigParam 25` (fwd fees).
69
+
***6**: `ConfigParam 43` (size limits).
70
+
***15**: "[due payment](https://github.com/ton-blockchain/ton/blob/8a9ff339927b22b72819c5125428b70c406da631/crypto/block/block.tlb#L237)" - current debt for storage fee (nanotons). Asm opcode: `DUEPAYMENT`.
70
71
71
72
### New TVM instructions
72
73
73
74
#### Fee calculation
74
-
*`GETEXECUTIONPRICE` (`gas_used is_mc - price`) - calculates gas fee.
75
-
*`GETSTORAGEPRICE` (`cells bits seconds is_mc - price`) - calculates storage fees (only current StoragePrices entry is used).
*`GETPRECOMPILEDGAS` (`- null`) - reserved, currently returns `null`.
79
+
*`GETORIGINALFWDFEE` (`fwd_fee is_mc - orig_fwd_fee`) - calculate `fwd_fee * 2^16 / first_frac`. Can be used to get the original `fwd_fee` of the message.
80
+
*`GETGASFEESIMPLE` (`gas_used is_mc - price`) - same as `GETGASFEE`, but without flat price (just `(gas_used * price) / 2^16`).
81
+
*`GETFORWARDFEESIMPLE` (`cells bits is_mc - price`) - same as `GETFORWARDFEE`, but without lump price (just `(bits*bit_price + cells*cell_price) / 2^16`).
78
82
79
83
`gas_used`, `cells`, `bits`, `time_delta` are integers in range `0..2^63-1`.
0 commit comments