diff --git a/cp0.json b/cp0.json index 1abc593..e809b54 100644 --- a/cp0.json +++ b/cp0.json @@ -666,6 +666,126 @@ "i": 13 } }, + { + "alias_of": "GETPARAM", + "description": "Retrives tuple that contains some config parameters as cell slices. If the parameter is absent from the config, the value is null. Values: \n* **0**: `StoragePrices` from `ConfigParam 18`. Not the whole dict, but only the one StoragePrices entry (one which corresponds to the current time).\n * **1**: `ConfigParam 19` (global id).\n * **2**: `ConfigParam 20` (mc gas prices).\n * **3**: `ConfigParam 21` (gas prices).\n * **4**: `ConfigParam 24` (mc fwd fees).\n * **5**: `ConfigParam 25` (fwd fees).\n * **6**: `ConfigParam 43` (size limits).", + "doc_fift": "UNPACKEDCONFIGTUPLE", + "doc_stack": " - t", + "mnemonic": "UNPACKEDCONFIGTUPLE", + "operands": { + "i": 14 + } + }, + { + "alias_of": "GETPARAM", + "description": "Retrives current debt for storage fee (nanotons).", + "doc_fift": "DUEPAYMENT", + "doc_stack": " - t", + "mnemonic": "DUEPAYMENT", + "operands": { + "i": 15 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Retrives `bounce` flag of incoming message.", + "doc_fift": "INMSG_BOUNCE", + "doc_stack": " - x", + "mnemonic": "INMSG_BOUNCE", + "operands": { + "i": 0 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Retrives `bounced` flag of incoming message.", + "doc_fift": "INMSG_BOUNCED", + "doc_stack": " - x", + "mnemonic": "INMSG_BOUNCED", + "operands": { + "i": 1 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Retrives `src` flag of incoming message.", + "doc_fift": "INMSG_SRC", + "doc_stack": " - x", + "mnemonic": "INMSG_SRC", + "operands": { + "i": 2 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Retrives `fwd_fee` field of incoming message.", + "doc_fift": "INMSG_FWDFEE", + "doc_stack": " - x", + "mnemonic": "INMSG_FWDFEE", + "operands": { + "i": 3 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Retrives `lt` field of incoming message.", + "doc_fift": "INMSG_LT", + "doc_stack": " - x", + "mnemonic": "INMSG_LT", + "operands": { + "i": 4 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Retrives `utime` field of incoming message.", + "doc_fift": "INMSG_UTIME", + "doc_stack": " - x", + "mnemonic": "INMSG_UTIME", + "operands": { + "i": 5 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Retrives original value of the message. This is sometimes different from the value in `INCOMINGVALUE` and TVM stack because of storage fees.", + "doc_fift": "INMSG_ORIGVALUE", + "doc_stack": " - x", + "mnemonic": "INMSG_ORIGVALUE", + "operands": { + "i": 6 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Retrives value of the message after deducting storage fees. This is same as in `INCOMINGVALUE` and TVM stack.", + "doc_fift": "INMSG_VALUE", + "doc_stack": " - x", + "mnemonic": "INMSG_VALUE", + "operands": { + "i": 7 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Same as in `INCOMINGVALUE`.", + "doc_fift": "INMSG_VALUEEXTRA", + "doc_stack": " - x", + "mnemonic": "INMSG_VALUEEXTRA", + "operands": { + "i": 8 + } + }, + { + "alias_of": "INMSGPARAM", + "description": "Retrieves `init` field of the incoming message.", + "doc_fift": "INMSG_STATEINIT", + "doc_stack": " - x", + "mnemonic": "INMSG_STATEINIT", + "operands": { + "i": 9 + } + }, { "alias_of": "DEBUG", "description": "Dumps the stack (at most the top 255 values) and shows the total stack depth. Does nothing on production versions of TVM.", @@ -30119,6 +30239,62 @@ } } }, + { + "bytecode": { + "operands": [], + "prefix": "CF50", + "tlb": "#CF50" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "cell_build", + "description": "Same as `ENDC CTOS`, but without gas cost for cell creation and loading.", + "fift": "BTOS", + "fift_examples": [], + "gas": "26", + "opcode": "CF50", + "stack": "b - s" + }, + "implementation": [ + { + "file": "cellops.cpp", + "function_name": "exec_builder_to_slice", + "line": 767, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/cellops.cpp" + } + ], + "mnemonic": "BTOS", + "since_version": 12, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + } + } + }, { "bytecode": { "operands": [ @@ -42100,6 +42276,134 @@ } } }, + { + "bytecode": { + "operands": [ + { + "display_hints": [], + "max_value": 255, + "min_value": 0, + "name": "mask", + "size": 8, + "type": "uint" + } + ], + "prefix": "EDE3", + "tlb": "#EDE3 mask:uint8" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "cont_registers", + "description": "Takes continuation, performs the equivalent of `c[i] PUSHCTR SWAP c[i] SETCONTCNR` for each `i` that is set in `mask` (mask is in `0..255`).", + "fift": "SETCONTCTRMANY\nSETCONTMANY", + "fift_examples": [], + "gas": "34", + "opcode": "EDE3mm", + "stack": "c - c'" + }, + "implementation": [ + { + "file": "contops.cpp", + "function_name": "exec_setcont_ctr_many", + "line": 926, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/contops.cpp" + } + ], + "mnemonic": "SETCONTCTRMANY", + "since_version": 9, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "c", + "type": "simple", + "value_types": [ + "Continuation" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "c2", + "type": "simple", + "value_types": [ + "Continuation" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "EDE4", + "tlb": "#EDE4" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "cont_registers", + "description": "Takes continuation, performs the equivalent of `c[i] PUSHCTR SWAP c[i] SETCONTCNR` for each `i` that is set in `mask` (mask is in `0..255`).", + "fift": "SETCONTCTRMANYX\nSETCONTMANYX", + "fift_examples": [], + "gas": "26", + "opcode": "EDE4", + "stack": "c mask - c'" + }, + "implementation": [ + { + "file": "contops.cpp", + "function_name": "exec_setcont_ctr_many_var", + "line": 943, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/contops.cpp" + } + ], + "mnemonic": "SETCONTCTRMANYX", + "since_version": 9, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "c", + "type": "simple", + "value_types": [ + "Continuation" + ] + }, + { + "name": "mask", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "c2", + "type": "simple", + "value_types": [ + "Continuation" + ] + } + ] + } + } + }, { "bytecode": { "operands": [], @@ -58895,6 +59199,59 @@ } } }, + { + "bytecode": { + "operands": [], + "prefix": "F83402", + "tlb": "#F83402" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_config", + "description": "Retrives `last_mc_blocks_divisible_by_100` part of PrevBlocksInfo from c7 (parameter 13).", + "fift": "PREVMCBLOCKS_100", + "fift_examples": [], + "gas": "", + "opcode": "F83402", + "stack": "- t" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_get_prev_blocks_info", + "line": 259, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "PREVMCBLOCKS_100", + "since_version": 9, + "value_flow": { + "inputs": { + "registers": [ + { + "index": 7, + "type": "constant" + } + ], + "stack": [] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "t", + "type": "simple", + "value_types": [ + "Tuple" + ] + } + ] + } + } + }, { "bytecode": { "operands": [], @@ -59693,41 +60050,46 @@ { "bytecode": { "operands": [], - "prefix": "F900", - "tlb": "#F900" + "prefix": "F880", + "tlb": "#F880" }, "control_flow": { "branches": [], "nobranch": true }, "doc": { - "category": "app_crypto", - "description": "Computes the representation hash of a _Cell_ `c` and returns it as a 256-bit unsigned integer `x`. Useful for signing and checking signatures of arbitrary entities represented by a tree of cells.", - "fift": "HASHCU", + "category": "app_global", + "description": "Takes id of the extra currency (integer in range `0..2^32-1`), returns the amount of this extra currency on the account balance. The first `5` executions of `GETEXTRABALANCE` consume at most `26 + 200` gas each. The subsequent executions incur the full gas cost of `26` (normal instruction cost) plus gas for loading cells (up to `3300` if the dictionary has maximum depth).", + "fift": "GETEXTRABALANCE", "fift_examples": [], "gas": "26", - "opcode": "F900", - "stack": "c - x" + "opcode": "F880", + "stack": "id - amount" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_compute_hash", - "line": 612, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_get_extra_currency_balance", + "line": 388, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHCU", - "since_version": 0, + "mnemonic": "GETEXTRABALANCE", + "since_version": 10, "value_flow": { "inputs": { - "registers": [], + "registers": [ + { + "index": 7, + "type": "constant" + } + ], "stack": [ { - "name": "c", + "name": "id", "type": "simple", "value_types": [ - "Cell" + "Integer" ] } ] @@ -59736,7 +60098,7 @@ "registers": [], "stack": [ { - "name": "x", + "name": "amount", "type": "simple", "value_types": [ "Integer" @@ -59748,45 +60110,111 @@ }, { "bytecode": { - "operands": [], - "prefix": "F901", - "tlb": "#F901" + "operands": [ + { + "display_hints": [], + "max_value": 255, + "min_value": 0, + "name": "i", + "size": 8, + "type": "uint" + } + ], + "prefix": "F881", + "tlb": "#F881 i:uint8" }, "control_flow": { "branches": [], "nobranch": true }, "doc": { - "category": "app_crypto", - "description": "Computes the hash of a _Slice_ `s` and returns it as a 256-bit unsigned integer `x`. The result is the same as if an ordinary cell containing only data and references from `s` had been created and its hash computed by `HASHCU`.", - "fift": "HASHSU", + "category": "app_config", + "description": "Returns the `i`-th parameter from the _Tuple_ provided at `c7` for `0 <= i <= 255`. Equivalent to `c7 PUSHCTR` `FIRST` `[i] INDEX`.\nIf one of these internal operations fails, throws an appropriate type checking or range checking exception.", + "fift": "[i] GETPARAMLONG", "fift_examples": [], - "gas": "526", - "opcode": "F901", - "stack": "s - x" + "gas": "34", + "opcode": "F881ii", + "stack": " - x" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_compute_hash", - "line": 612, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_get_var_param_long", + "line": 158, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHSU", - "since_version": 0, + "mnemonic": "GETPARAMLONG", + "since_version": 11, "value_flow": { "inputs": { + "registers": [ + { + "index": 7, + "type": "constant" + } + ], + "stack": [] + }, + "outputs": { "registers": [], "stack": [ { - "name": "s", + "name": "x", "type": "simple", - "value_types": [ - "Slice" - ] + "value_types": [] } ] + } + } + }, + { + "bytecode": { + "operands": [ + { + "display_hints": [], + "max_value": 15, + "min_value": 0, + "name": "i", + "size": 4, + "type": "uint" + } + ], + "prefix": "F89", + "tlb": "#F89 i:uint8" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_config", + "description": "Equivalent to `INMSGPARAMS` `i INDEX`", + "fift": "[i] INMSGPARAM", + "fift_examples": [], + "gas": "26", + "opcode": "F89i", + "stack": " - x" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_get_var_in_msg_param", + "line": 176, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "INMSGPARAM", + "since_version": 11, + "value_flow": { + "inputs": { + "registers": [ + { + "index": 7, + "type": "constant" + } + ], + "stack": [] }, "outputs": { "registers": [], @@ -59794,9 +60222,7 @@ { "name": "x", "type": "simple", - "value_types": [ - "Integer" - ] + "value_types": [] } ] } @@ -59805,8 +60231,8 @@ { "bytecode": { "operands": [], - "prefix": "F902", - "tlb": "#F902" + "prefix": "F900", + "tlb": "#F900" }, "control_flow": { "branches": [], @@ -59814,32 +60240,32 @@ }, "doc": { "category": "app_crypto", - "description": "Computes `Sha` of the data bits of _Slice_ `s`. If the bit length of `s` is not divisible by eight, throws a cell underflow exception. The hash value is returned as a 256-bit unsigned integer `x`.", - "fift": "SHA256U", + "description": "Computes the representation hash of a _Cell_ `c` and returns it as a 256-bit unsigned integer `x`. Useful for signing and checking signatures of arbitrary entities represented by a tree of cells.", + "fift": "HASHCU", "fift_examples": [], "gas": "26", - "opcode": "F902", - "stack": "s - x" + "opcode": "F900", + "stack": "c - x" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_compute_sha256", - "line": 634, + "function_name": "exec_compute_hash", + "line": 612, "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "SHA256U", + "mnemonic": "HASHCU", "since_version": 0, "value_flow": { "inputs": { "registers": [], "stack": [ { - "name": "s", + "name": "c", "type": "simple", "value_types": [ - "Slice" + "Cell" ] } ] @@ -59861,8 +60287,8 @@ { "bytecode": { "operands": [], - "prefix": "F90400", - "tlb": "#F90400" + "prefix": "F901", + "tlb": "#F901" }, "control_flow": { "branches": [], @@ -59870,47 +60296,32 @@ }, "doc": { "category": "app_crypto", - "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXT_SHA256", + "description": "Computes the hash of a _Slice_ `s` and returns it as a 256-bit unsigned integer `x`. The result is the same as if an ordinary cell containing only data and references from `s` had been created and its hash computed by `HASHCU`.", + "fift": "HASHSU", "fift_examples": [], - "gas": "1/33 gas per byte", - "opcode": "F90400", - "stack": "s_1 ... s_n n - h" + "gas": "526", + "opcode": "F901", + "stack": "s - x" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_hash_ext", - "line": 652, + "function_name": "exec_compute_hash", + "line": 612, "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXT_SHA256", - "since_version": 4, + "mnemonic": "HASHSU", + "since_version": 0, "value_flow": { "inputs": { "registers": [], "stack": [ { - "array_entry": [ - { - "name": "s", - "type": "simple", - "value_types": [ - "Slice", - "Builder" - ] - } - ], - "length_var": "n", - "name": "input_parts", - "type": "array" - }, - { - "name": "n", + "name": "s", "type": "simple", "value_types": [ - "Integer" + "Slice" ] } ] @@ -59919,7 +60330,7 @@ "registers": [], "stack": [ { - "name": "h", + "name": "x", "type": "simple", "value_types": [ "Integer" @@ -59932,8 +60343,8 @@ { "bytecode": { "operands": [], - "prefix": "F90401", - "tlb": "#F90401" + "prefix": "F902", + "tlb": "#F902" }, "control_flow": { "branches": [], @@ -59941,47 +60352,32 @@ }, "doc": { "category": "app_crypto", - "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXT_SHA512", + "description": "Computes `Sha` of the data bits of _Slice_ `s`. If the bit length of `s` is not divisible by eight, throws a cell underflow exception. The hash value is returned as a 256-bit unsigned integer `x`.", + "fift": "SHA256U", "fift_examples": [], - "gas": "1/16 gas per byte", - "opcode": "F90401", - "stack": "s_1 ... s_n n - h1 h2" + "gas": "26", + "opcode": "F902", + "stack": "s - x" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_hash_ext", - "line": 652, + "function_name": "exec_compute_sha256", + "line": 634, "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXT_SHA512", - "since_version": 4, + "mnemonic": "SHA256U", + "since_version": 0, "value_flow": { "inputs": { "registers": [], "stack": [ { - "array_entry": [ - { - "name": "s", - "type": "simple", - "value_types": [ - "Slice", - "Builder" - ] - } - ], - "length_var": "n", - "name": "input_parts", - "type": "array" - }, - { - "name": "n", + "name": "s", "type": "simple", "value_types": [ - "Integer" + "Slice" ] } ] @@ -59990,14 +60386,7 @@ "registers": [], "stack": [ { - "name": "h1", - "type": "simple", - "value_types": [ - "Integer" - ] - }, - { - "name": "h2", + "name": "x", "type": "simple", "value_types": [ "Integer" @@ -60010,8 +60399,8 @@ { "bytecode": { "operands": [], - "prefix": "F90402", - "tlb": "#F90402" + "prefix": "F90400", + "tlb": "#F90400" }, "control_flow": { "branches": [], @@ -60020,11 +60409,11 @@ "doc": { "category": "app_crypto", "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXT_BLAKE2B", + "fift": "HASHEXT_SHA256", "fift_examples": [], - "gas": "1/19 gas per byte", - "opcode": "F90402", - "stack": "s_1 ... s_n n - h1 h2" + "gas": "1/33 gas per byte", + "opcode": "F90400", + "stack": "s_1 ... s_n n - h" }, "implementation": [ { @@ -60034,7 +60423,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXT_BLAKE2B", + "mnemonic": "HASHEXT_SHA256", "since_version": 4, "value_flow": { "inputs": { @@ -60068,14 +60457,7 @@ "registers": [], "stack": [ { - "name": "h1", - "type": "simple", - "value_types": [ - "Integer" - ] - }, - { - "name": "h2", + "name": "h", "type": "simple", "value_types": [ "Integer" @@ -60088,8 +60470,8 @@ { "bytecode": { "operands": [], - "prefix": "F90403", - "tlb": "#F90403" + "prefix": "F90401", + "tlb": "#F90401" }, "control_flow": { "branches": [], @@ -60098,11 +60480,11 @@ "doc": { "category": "app_crypto", "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXT_KECCAK256", + "fift": "HASHEXT_SHA512", "fift_examples": [], - "gas": "1/11 gas per byte", - "opcode": "F90403", - "stack": "s_1 ... s_n n - h" + "gas": "1/16 gas per byte", + "opcode": "F90401", + "stack": "s_1 ... s_n n - h1 h2" }, "implementation": [ { @@ -60112,7 +60494,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXT_KECCAK256", + "mnemonic": "HASHEXT_SHA512", "since_version": 4, "value_flow": { "inputs": { @@ -60146,7 +60528,14 @@ "registers": [], "stack": [ { - "name": "h", + "name": "h1", + "type": "simple", + "value_types": [ + "Integer" + ] + }, + { + "name": "h2", "type": "simple", "value_types": [ "Integer" @@ -60159,8 +60548,8 @@ { "bytecode": { "operands": [], - "prefix": "F90404", - "tlb": "#F90404" + "prefix": "F90402", + "tlb": "#F90402" }, "control_flow": { "branches": [], @@ -60169,10 +60558,10 @@ "doc": { "category": "app_crypto", "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXT_KECCAK512", + "fift": "HASHEXT_BLAKE2B", "fift_examples": [], "gas": "1/19 gas per byte", - "opcode": "F90404", + "opcode": "F90402", "stack": "s_1 ... s_n n - h1 h2" }, "implementation": [ @@ -60183,7 +60572,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXT_KECCAK512", + "mnemonic": "HASHEXT_BLAKE2B", "since_version": 4, "value_flow": { "inputs": { @@ -60237,8 +60626,8 @@ { "bytecode": { "operands": [], - "prefix": "F90500", - "tlb": "#F90500" + "prefix": "F90403", + "tlb": "#F90403" }, "control_flow": { "branches": [], @@ -60247,11 +60636,11 @@ "doc": { "category": "app_crypto", "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXTR_SHA256", + "fift": "HASHEXT_KECCAK256", "fift_examples": [], - "gas": "1/33 gas per byte", - "opcode": "F90500", - "stack": "s_n ... s_1 n - h" + "gas": "1/11 gas per byte", + "opcode": "F90403", + "stack": "s_1 ... s_n n - h" }, "implementation": [ { @@ -60261,7 +60650,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTR_SHA256", + "mnemonic": "HASHEXT_KECCAK256", "since_version": 4, "value_flow": { "inputs": { @@ -60308,8 +60697,8 @@ { "bytecode": { "operands": [], - "prefix": "F90501", - "tlb": "#F90501" + "prefix": "F90404", + "tlb": "#F90404" }, "control_flow": { "branches": [], @@ -60318,11 +60707,11 @@ "doc": { "category": "app_crypto", "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXTR_SHA512", + "fift": "HASHEXT_KECCAK512", "fift_examples": [], - "gas": "1/16 gas per byte", - "opcode": "F90501", - "stack": "s_n ... s_1 n - h1 h2" + "gas": "1/19 gas per byte", + "opcode": "F90404", + "stack": "s_1 ... s_n n - h1 h2" }, "implementation": [ { @@ -60332,7 +60721,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTR_SHA512", + "mnemonic": "HASHEXT_KECCAK512", "since_version": 4, "value_flow": { "inputs": { @@ -60386,8 +60775,8 @@ { "bytecode": { "operands": [], - "prefix": "F90502", - "tlb": "#F90502" + "prefix": "F90500", + "tlb": "#F90500" }, "control_flow": { "branches": [], @@ -60396,11 +60785,11 @@ "doc": { "category": "app_crypto", "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXTR_BLAKE2B", + "fift": "HASHEXTR_SHA256", "fift_examples": [], - "gas": "1/19 gas per byte", - "opcode": "F90502", - "stack": "s_n ... s_1 n - h1 h2" + "gas": "1/33 gas per byte", + "opcode": "F90500", + "stack": "s_n ... s_1 n - h" }, "implementation": [ { @@ -60410,7 +60799,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTR_BLAKE2B", + "mnemonic": "HASHEXTR_SHA256", "since_version": 4, "value_flow": { "inputs": { @@ -60444,14 +60833,7 @@ "registers": [], "stack": [ { - "name": "h1", - "type": "simple", - "value_types": [ - "Integer" - ] - }, - { - "name": "h2", + "name": "h", "type": "simple", "value_types": [ "Integer" @@ -60464,8 +60846,8 @@ { "bytecode": { "operands": [], - "prefix": "F90503", - "tlb": "#F90503" + "prefix": "F90501", + "tlb": "#F90501" }, "control_flow": { "branches": [], @@ -60474,11 +60856,11 @@ "doc": { "category": "app_crypto", "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXTR_KECCAK256", + "fift": "HASHEXTR_SHA512", "fift_examples": [], - "gas": "1/11 gas per byte", - "opcode": "F90503", - "stack": "s_n ... s_1 n - h" + "gas": "1/16 gas per byte", + "opcode": "F90501", + "stack": "s_n ... s_1 n - h1 h2" }, "implementation": [ { @@ -60488,7 +60870,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTR_KECCAK256", + "mnemonic": "HASHEXTR_SHA512", "since_version": 4, "value_flow": { "inputs": { @@ -60522,7 +60904,14 @@ "registers": [], "stack": [ { - "name": "h", + "name": "h1", + "type": "simple", + "value_types": [ + "Integer" + ] + }, + { + "name": "h2", "type": "simple", "value_types": [ "Integer" @@ -60535,8 +60924,8 @@ { "bytecode": { "operands": [], - "prefix": "F90504", - "tlb": "#F90504" + "prefix": "F90502", + "tlb": "#F90502" }, "control_flow": { "branches": [], @@ -60545,10 +60934,10 @@ "doc": { "category": "app_crypto", "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", - "fift": "HASHEXTR_KECCAK512", + "fift": "HASHEXTR_BLAKE2B", "fift_examples": [], "gas": "1/19 gas per byte", - "opcode": "F90504", + "opcode": "F90502", "stack": "s_n ... s_1 n - h1 h2" }, "implementation": [ @@ -60559,7 +60948,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTR_KECCAK512", + "mnemonic": "HASHEXTR_BLAKE2B", "since_version": 4, "value_flow": { "inputs": { @@ -60613,8 +61002,8 @@ { "bytecode": { "operands": [], - "prefix": "F90600", - "tlb": "#F90600" + "prefix": "F90503", + "tlb": "#F90503" }, "control_flow": { "branches": [], @@ -60622,12 +61011,12 @@ }, "doc": { "category": "app_crypto", - "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", - "fift": "HASHEXTA_SHA256", + "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", + "fift": "HASHEXTR_KECCAK256", "fift_examples": [], - "gas": "1/33 gas per byte", - "opcode": "F90600", - "stack": "b s_1 ... s_n n - b'" + "gas": "1/11 gas per byte", + "opcode": "F90503", + "stack": "s_n ... s_1 n - h" }, "implementation": [ { @@ -60637,19 +61026,12 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTA_SHA256", + "mnemonic": "HASHEXTR_KECCAK256", "since_version": 4, "value_flow": { "inputs": { "registers": [], "stack": [ - { - "name": "b", - "type": "simple", - "value_types": [ - "Builder" - ] - }, { "array_entry": [ { @@ -60678,10 +61060,10 @@ "registers": [], "stack": [ { - "name": "b2", + "name": "h", "type": "simple", "value_types": [ - "Builder" + "Integer" ] } ] @@ -60691,8 +61073,8 @@ { "bytecode": { "operands": [], - "prefix": "F90601", - "tlb": "#F90601" + "prefix": "F90504", + "tlb": "#F90504" }, "control_flow": { "branches": [], @@ -60700,12 +61082,12 @@ }, "doc": { "category": "app_crypto", - "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", - "fift": "HASHEXTA_SHA512", + "description": "Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.", + "fift": "HASHEXTR_KECCAK512", "fift_examples": [], - "gas": "1/16 gas per byte", - "opcode": "F90601", - "stack": "b s_1 ... s_n n - b'" + "gas": "1/19 gas per byte", + "opcode": "F90504", + "stack": "s_n ... s_1 n - h1 h2" }, "implementation": [ { @@ -60715,19 +61097,12 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTA_SHA512", + "mnemonic": "HASHEXTR_KECCAK512", "since_version": 4, "value_flow": { "inputs": { "registers": [], "stack": [ - { - "name": "b", - "type": "simple", - "value_types": [ - "Builder" - ] - }, { "array_entry": [ { @@ -60756,99 +61131,28 @@ "registers": [], "stack": [ { - "name": "b2", - "type": "simple", - "value_types": [ - "Builder" - ] - } - ] - } - } - }, - { - "bytecode": { - "operands": [], - "prefix": "F90602", - "tlb": "#F90602" - }, - "control_flow": { - "branches": [], - "nobranch": true - }, - "doc": { - "category": "app_crypto", - "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", - "fift": "HASHEXTA_BLAKE2B", - "fift_examples": [], - "gas": "1/19 gas per byte", - "opcode": "F90602", - "stack": "b s_1 ... s_n n - b'" - }, - "implementation": [ - { - "file": "tonops.cpp", - "function_name": "exec_hash_ext", - "line": 652, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" - } - ], - "mnemonic": "HASHEXTA_BLAKE2B", - "since_version": 4, - "value_flow": { - "inputs": { - "registers": [], - "stack": [ - { - "name": "b", + "name": "h1", "type": "simple", "value_types": [ - "Builder" + "Integer" ] }, { - "array_entry": [ - { - "name": "s", - "type": "simple", - "value_types": [ - "Slice", - "Builder" - ] - } - ], - "length_var": "n", - "name": "input_parts", - "type": "array" - }, - { - "name": "n", + "name": "h2", "type": "simple", "value_types": [ "Integer" ] } ] - }, - "outputs": { - "registers": [], - "stack": [ - { - "name": "b2", - "type": "simple", - "value_types": [ - "Builder" - ] - } - ] } } }, { "bytecode": { "operands": [], - "prefix": "F90603", - "tlb": "#F90603" + "prefix": "F90600", + "tlb": "#F90600" }, "control_flow": { "branches": [], @@ -60857,10 +61161,10 @@ "doc": { "category": "app_crypto", "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", - "fift": "HASHEXTA_KECCAK256", + "fift": "HASHEXTA_SHA256", "fift_examples": [], - "gas": "1/11 gas per byte", - "opcode": "F90603", + "gas": "1/33 gas per byte", + "opcode": "F90600", "stack": "b s_1 ... s_n n - b'" }, "implementation": [ @@ -60871,7 +61175,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTA_KECCAK256", + "mnemonic": "HASHEXTA_SHA256", "since_version": 4, "value_flow": { "inputs": { @@ -60925,8 +61229,8 @@ { "bytecode": { "operands": [], - "prefix": "F90604", - "tlb": "#F90604" + "prefix": "F90601", + "tlb": "#F90601" }, "control_flow": { "branches": [], @@ -60935,10 +61239,10 @@ "doc": { "category": "app_crypto", "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", - "fift": "HASHEXTA_KECCAK512", + "fift": "HASHEXTA_SHA512", "fift_examples": [], - "gas": "1/6 gas per byte", - "opcode": "F90604", + "gas": "1/16 gas per byte", + "opcode": "F90601", "stack": "b s_1 ... s_n n - b'" }, "implementation": [ @@ -60949,7 +61253,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTA_KECCAK512", + "mnemonic": "HASHEXTA_SHA512", "since_version": 4, "value_flow": { "inputs": { @@ -61003,8 +61307,8 @@ { "bytecode": { "operands": [], - "prefix": "F90700", - "tlb": "#F90700" + "prefix": "F90602", + "tlb": "#F90602" }, "control_flow": { "branches": [], @@ -61013,10 +61317,10 @@ "doc": { "category": "app_crypto", "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", - "fift": "HASHEXTAR_SHA256", + "fift": "HASHEXTA_BLAKE2B", "fift_examples": [], - "gas": "1/33 gas per byte", - "opcode": "F90700", + "gas": "1/19 gas per byte", + "opcode": "F90602", "stack": "b s_1 ... s_n n - b'" }, "implementation": [ @@ -61027,7 +61331,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTAR_SHA256", + "mnemonic": "HASHEXTA_BLAKE2B", "since_version": 4, "value_flow": { "inputs": { @@ -61081,8 +61385,8 @@ { "bytecode": { "operands": [], - "prefix": "F90701", - "tlb": "#F90701" + "prefix": "F90603", + "tlb": "#F90603" }, "control_flow": { "branches": [], @@ -61091,11 +61395,11 @@ "doc": { "category": "app_crypto", "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", - "fift": "HASHEXTAR_SHA512", + "fift": "HASHEXTA_KECCAK256", "fift_examples": [], - "gas": "1/16 gas per byte", - "opcode": "F90701", - "stack": "b s_n ... s_1 n - b'" + "gas": "1/11 gas per byte", + "opcode": "F90603", + "stack": "b s_1 ... s_n n - b'" }, "implementation": [ { @@ -61105,7 +61409,7 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTAR_SHA512", + "mnemonic": "HASHEXTA_KECCAK256", "since_version": 4, "value_flow": { "inputs": { @@ -61159,8 +61463,8 @@ { "bytecode": { "operands": [], - "prefix": "F90702", - "tlb": "#F90702" + "prefix": "F90604", + "tlb": "#F90604" }, "control_flow": { "branches": [], @@ -61169,11 +61473,11 @@ "doc": { "category": "app_crypto", "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", - "fift": "HASHEXTAR_BLAKE2B", + "fift": "HASHEXTA_KECCAK512", "fift_examples": [], - "gas": "1/19 gas per byte", - "opcode": "F90702", - "stack": "b s_n ... s_1 n - b'" + "gas": "1/6 gas per byte", + "opcode": "F90604", + "stack": "b s_1 ... s_n n - b'" }, "implementation": [ { @@ -61183,7 +61487,241 @@ "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "HASHEXTAR_BLAKE2B", + "mnemonic": "HASHEXTA_KECCAK512", + "since_version": 4, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" + ] + }, + { + "array_entry": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice", + "Builder" + ] + } + ], + "length_var": "n", + "name": "input_parts", + "type": "array" + }, + { + "name": "n", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "b2", + "type": "simple", + "value_types": [ + "Builder" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "F90700", + "tlb": "#F90700" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_crypto", + "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", + "fift": "HASHEXTAR_SHA256", + "fift_examples": [], + "gas": "1/33 gas per byte", + "opcode": "F90700", + "stack": "b s_1 ... s_n n - b'" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_hash_ext", + "line": 652, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "HASHEXTAR_SHA256", + "since_version": 4, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" + ] + }, + { + "array_entry": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice", + "Builder" + ] + } + ], + "length_var": "n", + "name": "input_parts", + "type": "array" + }, + { + "name": "n", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "b2", + "type": "simple", + "value_types": [ + "Builder" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "F90701", + "tlb": "#F90701" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_crypto", + "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", + "fift": "HASHEXTAR_SHA512", + "fift_examples": [], + "gas": "1/16 gas per byte", + "opcode": "F90701", + "stack": "b s_n ... s_1 n - b'" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_hash_ext", + "line": 652, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "HASHEXTAR_SHA512", + "since_version": 4, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" + ] + }, + { + "array_entry": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice", + "Builder" + ] + } + ], + "length_var": "n", + "name": "input_parts", + "type": "array" + }, + { + "name": "n", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "b2", + "type": "simple", + "value_types": [ + "Builder" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "F90702", + "tlb": "#F90702" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_crypto", + "description": "Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.", + "fift": "HASHEXTAR_BLAKE2B", + "fift_examples": [], + "gas": "1/19 gas per byte", + "opcode": "F90702", + "stack": "b s_n ... s_1 n - b'" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_hash_ext", + "line": 652, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "HASHEXTAR_BLAKE2B", "since_version": 4, "value_flow": { "inputs": { @@ -61643,6 +62181,105 @@ } } }, + { + "bytecode": { + "operands": [], + "prefix": "F913", + "tlb": "#F913" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_crypto", + "description": "performs [`secp256k1_xonly_pubkey_tweak_add`](https://github.com/bitcoin-core/secp256k1/blob/master/include/secp256k1_extrakeys.h#L120). `key` and `tweak` are 256-bit unsigned integers. 65-byte public key is returned as `uint8 f`, `uint256 x, y` (as in `ECRECOVER`).", + "fift": "SECP256K1_XONLY_PUBKEY_TWEAK_ADD", + "fift_examples": [], + "gas": "1576", + "opcode": "F913", + "stack": "key tweak - 0 or f x y -1" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_secp256k1_xonly_pubkey_tweak_add", + "line": 798, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "SECP256K1_XONLY_PUBKEY_TWEAK_ADD", + "since_version": 9, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "key", + "type": "simple", + "value_types": [ + "Integer" + ] + }, + { + "name": "tweak", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "match": [ + { + "stack": [], + "value": 0 + }, + { + "stack": [ + { + "name": "f", + "type": "simple", + "value_types": [ + "Integer" + ] + }, + { + "name": "x", + "type": "simple", + "value_types": [ + "Integer" + ] + }, + { + "name": "y", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ], + "value": -1 + } + ], + "name": "status", + "type": "conditional" + }, + { + "name": "status", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + } + } + }, { "bytecode": { "operands": [], @@ -61783,6 +62420,62 @@ } } }, + { + "bytecode": { + "operands": [], + "prefix": "F916", + "tlb": "#F916" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_crypto", + "description": "Same as `ENDC HASHCU`, but without gas cost for cell creation.", + "fift": "HASHBU", + "fift_examples": [], + "gas": "26", + "opcode": "F916", + "stack": "b - hash" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_compute_hash", + "line": 612, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "HASHBU", + "since_version": 12, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "hash", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + } + } + }, { "bytecode": { "operands": [], @@ -64742,10 +65435,552 @@ ] }, { - "name": "s2", + "name": "s2", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "FA05", + "tlb": "#FA05" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_currency", + "description": "Similar to `LDVARUINT32`, but loads a _signed_ _Integer_ `x`.\nApproximately equivalent to `5 LDU` `SWAP` `3 LSHIFT#` `LDIX`.", + "fift": "LDVARINT32", + "fift_examples": [], + "gas": "26", + "opcode": "FA05", + "stack": "s - x s'" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_load_var_integer", + "line": 1453, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "LDVARINT32", + "since_version": 0, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "x", + "type": "simple", + "value_types": [ + "Integer" + ] + }, + { + "name": "s2", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "FA06", + "tlb": "#FA06" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_currency", + "description": "Stores (serializes) an _Integer_ `x` in the range `0...2^248-1` into _Builder_ `b`, and returns the resulting _Builder_ `b'`. The serialization of `x` consists of a 5-bit unsigned big-endian integer `l`, which is the smallest integer `l>=0`, such that `x<2^(8l)`, followed by an `8l`-bit unsigned big-endian representation of `x`. If `x` does not belong to the supported range, a range check exception is thrown.", + "fift": "STVARUINT32", + "fift_examples": [], + "gas": "26", + "opcode": "FA06", + "stack": "b x - b'" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_store_var_integer", + "line": 1474, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "STVARUINT32", + "since_version": 0, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" + ] + }, + { + "name": "x", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "b2", + "type": "simple", + "value_types": [ + "Builder" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "FA07", + "tlb": "#FA07" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_currency", + "description": "Similar to `STVARUINT32`, but serializes a _signed_ _Integer_ `x` in the range `-2^247...2^247-1`.", + "fift": "STVARINT32", + "fift_examples": [], + "gas": "26", + "opcode": "FA07", + "stack": "b x - b'" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_store_var_integer", + "line": 1474, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "STVARINT32", + "since_version": 0, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" + ] + }, + { + "name": "x", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "b2", + "type": "simple", + "value_types": [ + "Builder" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "FA40", + "tlb": "#FA40" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_addr", + "description": "Loads from _Slice_ `s` the only prefix that is a valid `MsgAddress`, and returns both this prefix `s'` and the remainder `s''` of `s` as slices.", + "fift": "LDMSGADDR", + "fift_examples": [], + "gas": "26", + "opcode": "FA40", + "stack": "s - s' s''" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_load_message_addr", + "line": 1536, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "LDMSGADDR", + "since_version": 0, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "s2", + "type": "simple", + "value_types": [ + "Slice" + ] + }, + { + "name": "s3", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "FA41", + "tlb": "#FA41" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_addr", + "description": "A quiet version of `LDMSGADDR`: on success, pushes an extra `-1`; on failure, pushes the original `s` and a zero.", + "fift": "LDMSGADDRQ", + "fift_examples": [], + "gas": "26", + "opcode": "FA41", + "stack": "s - s' s'' -1 or s 0" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_load_message_addr", + "line": 1536, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "LDMSGADDRQ", + "since_version": 0, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "match": [ + { + "stack": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ], + "value": 0 + }, + { + "stack": [ + { + "name": "s2", + "type": "simple", + "value_types": [ + "Slice" + ] + }, + { + "name": "s3", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ], + "value": -1 + } + ], + "name": "status", + "type": "conditional" + }, + { + "name": "status", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "FA42", + "tlb": "#FA42" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_addr", + "description": "Decomposes _Slice_ `s` containing a valid `MsgAddress` into a _Tuple_ `t` with separate fields of this `MsgAddress`. If `s` is not a valid `MsgAddress`, a cell deserialization exception is thrown.", + "fift": "PARSEMSGADDR", + "fift_examples": [], + "gas": "26", + "opcode": "FA42", + "stack": "s - t" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_parse_message_addr", + "line": 1629, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "PARSEMSGADDR", + "since_version": 0, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "t", + "type": "simple", + "value_types": [ + "Tuple" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "FA43", + "tlb": "#FA43" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_addr", + "description": "A quiet version of `PARSEMSGADDR`: returns a zero on error instead of throwing an exception.", + "fift": "PARSEMSGADDRQ", + "fift_examples": [], + "gas": "26", + "opcode": "FA43", + "stack": "s - t -1 or 0" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_parse_message_addr", + "line": 1629, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "PARSEMSGADDRQ", + "since_version": 0, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "match": [ + { + "stack": [], + "value": 0 + }, + { + "stack": [ + { + "name": "t", + "type": "simple", + "value_types": [ + "Tuple" + ] + } + ], + "value": -1 + } + ], + "name": "status", + "type": "conditional" + }, + { + "name": "status", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ] + } + } + }, + { + "bytecode": { + "operands": [], + "prefix": "FA44", + "tlb": "#FA44" + }, + "control_flow": { + "branches": [], + "nobranch": true + }, + "doc": { + "category": "app_addr", + "description": "Parses _Slice_ `s` containing a valid `MsgAddressInt` (usually a `msg_addr_std`), applies rewriting from the `anycast` (if present) to the same-length prefix of the address, and returns both the workchain `x` and the 256-bit address `y` as integers. If the address is not 256-bit, or if `s` is not a valid serialization of `MsgAddressInt`, throws a cell deserialization exception.", + "fift": "REWRITESTDADDR", + "fift_examples": [], + "gas": "26", + "opcode": "FA44", + "stack": "s - x y" + }, + "implementation": [ + { + "file": "tonops.cpp", + "function_name": "exec_rewrite_message_addr", + "line": 1669, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + } + ], + "mnemonic": "REWRITESTDADDR", + "since_version": 0, + "value_flow": { + "inputs": { + "registers": [], + "stack": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ] + }, + "outputs": { + "registers": [], + "stack": [ + { + "name": "x", + "type": "simple", + "value_types": [ + "Integer" + ] + }, + { + "name": "y", "type": "simple", "value_types": [ - "Slice" + "Integer" ] } ] @@ -64755,31 +65990,31 @@ { "bytecode": { "operands": [], - "prefix": "FA05", - "tlb": "#FA05" + "prefix": "FA45", + "tlb": "#FA45" }, "control_flow": { "branches": [], "nobranch": true }, "doc": { - "category": "app_currency", - "description": "Similar to `LDVARUINT32`, but loads a _signed_ _Integer_ `x`.\nApproximately equivalent to `5 LDU` `SWAP` `3 LSHIFT#` `LDIX`.", - "fift": "LDVARINT32", + "category": "app_addr", + "description": "A quiet version of primitive `REWRITESTDADDR`.", + "fift": "REWRITESTDADDRQ", "fift_examples": [], "gas": "26", - "opcode": "FA05", - "stack": "s - x s'" + "opcode": "FA45", + "stack": "s - x y -1 or 0" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_load_var_integer", - "line": 1453, + "function_name": "exec_rewrite_message_addr", + "line": 1669, "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "LDVARINT32", + "mnemonic": "REWRITESTDADDRQ", "since_version": 0, "value_flow": { "inputs": { @@ -64798,17 +66033,39 @@ "registers": [], "stack": [ { - "name": "x", - "type": "simple", - "value_types": [ - "Integer" - ] + "match": [ + { + "stack": [], + "value": 0 + }, + { + "stack": [ + { + "name": "x", + "type": "simple", + "value_types": [ + "Integer" + ] + }, + { + "name": "y", + "type": "simple", + "value_types": [ + "Integer" + ] + } + ], + "value": -1 + } + ], + "name": "status", + "type": "conditional" }, { - "name": "s2", + "name": "status", "type": "simple", "value_types": [ - "Slice" + "Integer" ] } ] @@ -64818,48 +66075,41 @@ { "bytecode": { "operands": [], - "prefix": "FA06", - "tlb": "#FA06" + "prefix": "FA46", + "tlb": "#FA46" }, "control_flow": { "branches": [], "nobranch": true }, "doc": { - "category": "app_currency", - "description": "Stores (serializes) an _Integer_ `x` in the range `0...2^248-1` into _Builder_ `b`, and returns the resulting _Builder_ `b'`. The serialization of `x` consists of a 5-bit unsigned big-endian integer `l`, which is the smallest integer `l>=0`, such that `x<2^(8l)`, followed by an `8l`-bit unsigned big-endian representation of `x`. If `x` does not belong to the supported range, a range check exception is thrown.", - "fift": "STVARUINT32", + "category": "app_addr", + "description": "`msg_addr_var` not allowed since TVM v10, so it behaves like `REWRITESTDADDR`, but returns account id in `Slice`, not `Integer`: parses address `s` into workchain `x` and account id `s`.", + "fift": "REWRITEVARADDR", "fift_examples": [], "gas": "26", - "opcode": "FA06", - "stack": "b x - b'" + "opcode": "FA46", + "stack": "s - x s'" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_store_var_integer", - "line": 1474, + "function_name": "exec_rewrite_message_addr", + "line": 1669, "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "STVARUINT32", + "mnemonic": "REWRITEVARADDR", "since_version": 0, "value_flow": { "inputs": { "registers": [], "stack": [ { - "name": "b", - "type": "simple", - "value_types": [ - "Builder" - ] - }, - { - "name": "x", + "name": "s", "type": "simple", "value_types": [ - "Integer" + "Slice" ] } ] @@ -64868,10 +66118,17 @@ "registers": [], "stack": [ { - "name": "b2", + "name": "x", "type": "simple", "value_types": [ - "Builder" + "Integer" + ] + }, + { + "name": "s2", + "type": "simple", + "value_types": [ + "Slice" ] } ] @@ -64881,48 +66138,41 @@ { "bytecode": { "operands": [], - "prefix": "FA07", - "tlb": "#FA07" + "prefix": "FA47", + "tlb": "#FA47" }, "control_flow": { "branches": [], "nobranch": true }, "doc": { - "category": "app_currency", - "description": "Similar to `STVARUINT32`, but serializes a _signed_ _Integer_ `x` in the range `-2^247...2^247-1`.", - "fift": "STVARINT32", + "category": "app_addr", + "description": "A quiet version of primitive `REWRITEVARADDR`.", + "fift": "REWRITEVARADDRQ", "fift_examples": [], "gas": "26", - "opcode": "FA07", - "stack": "b x - b'" + "opcode": "FA47", + "stack": "s - x s' -1 or 0" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_store_var_integer", - "line": 1474, + "function_name": "exec_rewrite_message_addr", + "line": 1669, "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" } ], - "mnemonic": "STVARINT32", + "mnemonic": "REWRITEVARADDRQ", "since_version": 0, "value_flow": { "inputs": { "registers": [], "stack": [ { - "name": "b", - "type": "simple", - "value_types": [ - "Builder" - ] - }, - { - "name": "x", + "name": "s", "type": "simple", "value_types": [ - "Integer" + "Slice" ] } ] @@ -64931,10 +66181,39 @@ "registers": [], "stack": [ { - "name": "b2", + "match": [ + { + "stack": [], + "value": 0 + }, + { + "stack": [ + { + "name": "x", + "type": "simple", + "value_types": [ + "Integer" + ] + }, + { + "name": "s'", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ], + "value": -1 + } + ], + "name": "status", + "type": "conditional" + }, + { + "name": "status", "type": "simple", "value_types": [ - "Builder" + "Integer" ] } ] @@ -64944,8 +66223,8 @@ { "bytecode": { "operands": [], - "prefix": "FA40", - "tlb": "#FA40" + "prefix": "FA48", + "tlb": "#FA48" }, "control_flow": { "branches": [], @@ -64953,23 +66232,23 @@ }, "doc": { "category": "app_addr", - "description": "Loads from _Slice_ `s` the only prefix that is a valid `MsgAddress`, and returns both this prefix `s'` and the remainder `s''` of `s` as slices.", - "fift": "LDMSGADDR", + "description": "Loads `addr_std$10`, if address is not `addr_std`, throws an error 9 (`cannot load a MsgAddressInt`).", + "fift": "LDSTDADDR", "fift_examples": [], "gas": "26", - "opcode": "FA40", - "stack": "s - s' s''" + "opcode": "FA48", + "stack": "s - a s'" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_load_message_addr", - "line": 1536, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_load_std_message_addr", + "line": 1568, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "LDMSGADDR", - "since_version": 0, + "mnemonic": "LDSTDADDR", + "since_version": 12, "value_flow": { "inputs": { "registers": [], @@ -64987,14 +66266,14 @@ "registers": [], "stack": [ { - "name": "s2", + "name": "a", "type": "simple", "value_types": [ "Slice" ] }, { - "name": "s3", + "name": "s2", "type": "simple", "value_types": [ "Slice" @@ -65007,8 +66286,8 @@ { "bytecode": { "operands": [], - "prefix": "FA41", - "tlb": "#FA41" + "prefix": "FA49", + "tlb": "#FA49" }, "control_flow": { "branches": [], @@ -65016,23 +66295,23 @@ }, "doc": { "category": "app_addr", - "description": "A quiet version of `LDMSGADDR`: on success, pushes an extra `-1`; on failure, pushes the original `s` and a zero.", - "fift": "LDMSGADDRQ", + "description": "A quiet version of primitive `LDSTDADDR`.", + "fift": "LDSTDADDRQ", "fift_examples": [], "gas": "26", - "opcode": "FA41", - "stack": "s - s' s'' -1 or s 0" + "opcode": "FA49", + "stack": "s - a s' -1 or s 0" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_load_message_addr", - "line": 1536, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_load_std_message_addr", + "line": 1568, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "LDMSGADDRQ", - "since_version": 0, + "mnemonic": "LDSTDADDRQ", + "since_version": 12, "value_flow": { "inputs": { "registers": [], @@ -65066,14 +66345,14 @@ { "stack": [ { - "name": "s2", + "name": "a", "type": "simple", "value_types": [ "Slice" ] }, { - "name": "s3", + "name": "s'", "type": "simple", "value_types": [ "Slice" @@ -65100,8 +66379,8 @@ { "bytecode": { "operands": [], - "prefix": "FA42", - "tlb": "#FA42" + "prefix": "FA50", + "tlb": "#FA50" }, "control_flow": { "branches": [], @@ -65109,23 +66388,23 @@ }, "doc": { "category": "app_addr", - "description": "Decomposes _Slice_ `s` containing a valid `MsgAddress` into a _Tuple_ `t` with separate fields of this `MsgAddress`. If `s` is not a valid `MsgAddress`, a cell deserialization exception is thrown.", - "fift": "PARSEMSGADDR", + "description": "Loads `addr_std$10` or `addr_none$00`, if address is `addr_none$00` pushes a Null, if address is not `addr_std` or `addr_none`, throws an error 9 (`cannot load a MsgAddressInt`).", + "fift": "LDOPTSTDADDR", "fift_examples": [], "gas": "26", - "opcode": "FA42", - "stack": "s - t" + "opcode": "FA50", + "stack": "s - a s'" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_parse_message_addr", - "line": 1629, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_load_opt_std_message_addr", + "line": 1586, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "PARSEMSGADDR", - "since_version": 0, + "mnemonic": "LDOPTSTDADDR", + "since_version": 12, "value_flow": { "inputs": { "registers": [], @@ -65143,10 +66422,18 @@ "registers": [], "stack": [ { - "name": "t", + "name": "a", "type": "simple", "value_types": [ - "Tuple" + "Slice", + "Null" + ] + }, + { + "name": "s2", + "type": "simple", + "value_types": [ + "Slice" ] } ] @@ -65156,8 +66443,8 @@ { "bytecode": { "operands": [], - "prefix": "FA43", - "tlb": "#FA43" + "prefix": "FA51", + "tlb": "#FA51" }, "control_flow": { "branches": [], @@ -65165,23 +66452,23 @@ }, "doc": { "category": "app_addr", - "description": "A quiet version of `PARSEMSGADDR`: returns a zero on error instead of throwing an exception.", - "fift": "PARSEMSGADDRQ", + "description": "A quiet version of primitive `LDOPTSTDADDR`.", + "fift": "LDOPTSTDADDRQ", "fift_examples": [], "gas": "26", - "opcode": "FA43", - "stack": "s - t -1 or 0" + "opcode": "FA51", + "stack": "s - a s' -1 or s 0" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_parse_message_addr", - "line": 1629, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_load_opt_std_message_addr", + "line": 1586, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "PARSEMSGADDRQ", - "since_version": 0, + "mnemonic": "LDOPTSTDADDRQ", + "since_version": 12, "value_flow": { "inputs": { "registers": [], @@ -65190,7 +66477,8 @@ "name": "s", "type": "simple", "value_types": [ - "Slice" + "Slice", + "Null" ] } ] @@ -65201,16 +66489,32 @@ { "match": [ { - "stack": [], + "stack": [ + { + "name": "s", + "type": "simple", + "value_types": [ + "Slice" + ] + } + ], "value": 0 }, { "stack": [ { - "name": "t", + "name": "a", "type": "simple", "value_types": [ - "Tuple" + "Slice", + "Null" + ] + }, + { + "name": "s'", + "type": "simple", + "value_types": [ + "Slice" ] } ], @@ -65234,8 +66538,8 @@ { "bytecode": { "operands": [], - "prefix": "FA44", - "tlb": "#FA44" + "prefix": "FA52", + "tlb": "#FA52" }, "control_flow": { "branches": [], @@ -65243,33 +66547,40 @@ }, "doc": { "category": "app_addr", - "description": "Parses _Slice_ `s` containing a valid `MsgAddressInt` (usually a `msg_addr_std`), applies rewriting from the `anycast` (if present) to the same-length prefix of the address, and returns both the workchain `x` and the 256-bit address `y` as integers. If the address is not 256-bit, or if `s` is not a valid serialization of `MsgAddressInt`, throws a cell deserialization exception.", - "fift": "REWRITESTDADDR", + "description": "Stores `addr_std$10`, if address is not `addr_std`, throws an error 9 (`cannot load a MsgAddressInt`).", + "fift": "STSTDADDR", "fift_examples": [], "gas": "26", - "opcode": "FA44", - "stack": "s - x y" + "opcode": "FA52", + "stack": "a b - b'" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_rewrite_message_addr", - "line": 1669, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_store_std_address", + "line": 1822, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "REWRITESTDADDR", - "since_version": 0, + "mnemonic": "STSTDADDR", + "since_version": 12, "value_flow": { "inputs": { "registers": [], "stack": [ { - "name": "s", + "name": "a", "type": "simple", "value_types": [ "Slice" ] + }, + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" + ] } ] }, @@ -65277,17 +66588,10 @@ "registers": [], "stack": [ { - "name": "x", - "type": "simple", - "value_types": [ - "Integer" - ] - }, - { - "name": "y", + "name": "b2", "type": "simple", "value_types": [ - "Integer" + "Builder" ] } ] @@ -65297,8 +66601,8 @@ { "bytecode": { "operands": [], - "prefix": "FA45", - "tlb": "#FA45" + "prefix": "FA53", + "tlb": "#FA53" }, "control_flow": { "branches": [], @@ -65306,33 +66610,40 @@ }, "doc": { "category": "app_addr", - "description": "A quiet version of primitive `REWRITESTDADDR`.", - "fift": "REWRITESTDADDRQ", + "description": "A quiet version of primitive `STSTDADDR`.", + "fift": "STSTDADDRQ", "fift_examples": [], "gas": "26", - "opcode": "FA45", - "stack": "s - x y -1 or 0" + "opcode": "FA53", + "stack": "a b - b' 0 or a b -1" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_rewrite_message_addr", - "line": 1669, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_store_std_address", + "line": 1822, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "REWRITESTDADDRQ", - "since_version": 0, + "mnemonic": "STSTDADDRQ", + "since_version": 12, "value_flow": { "inputs": { "registers": [], "stack": [ { - "name": "s", + "name": "a", "type": "simple", "value_types": [ "Slice" ] + }, + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" + ] } ] }, @@ -65342,23 +66653,31 @@ { "match": [ { - "stack": [], + "stack": [ + { + "name": "b2", + "type": "simple", + "value_types": [ + "Builder" + ] + } + ], "value": 0 }, { "stack": [ { - "name": "x", + "name": "a", "type": "simple", "value_types": [ - "Integer" + "Slice" ] }, { - "name": "y", + "name": "b", "type": "simple", "value_types": [ - "Integer" + "Builder" ] } ], @@ -65382,8 +66701,8 @@ { "bytecode": { "operands": [], - "prefix": "FA46", - "tlb": "#FA46" + "prefix": "FA54", + "tlb": "#FA54" }, "control_flow": { "branches": [], @@ -65391,32 +66710,40 @@ }, "doc": { "category": "app_addr", - "description": "A variant of `REWRITESTDADDR` that returns the (rewritten) address as a _Slice_ `s`, even if it is not exactly 256 bit long (represented by a `msg_addr_var`).", - "fift": "REWRITEVARADDR", + "description": "stores `addr_std$10` or Null. Null is stored as `addr_none$00`, if address is not `addr_std`, throws an error 9 (`cannot load a MsgAddressInt`).", + "fift": "STOPTSTDADDR", "fift_examples": [], "gas": "26", - "opcode": "FA46", - "stack": "s - x s'" + "opcode": "FA54", + "stack": "a b - b'" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_rewrite_message_addr", - "line": 1669, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_store_opt_std_address", + "line": 1855, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "REWRITEVARADDR", - "since_version": 0, + "mnemonic": "STOPTSTDADDR", + "since_version": 12, "value_flow": { "inputs": { "registers": [], "stack": [ { - "name": "s", + "name": "a", "type": "simple", "value_types": [ - "Slice" + "Slice", + "Null" + ] + }, + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" ] } ] @@ -65425,17 +66752,10 @@ "registers": [], "stack": [ { - "name": "x", - "type": "simple", - "value_types": [ - "Integer" - ] - }, - { - "name": "s2", + "name": "b2", "type": "simple", "value_types": [ - "Slice" + "Builder" ] } ] @@ -65445,8 +66765,8 @@ { "bytecode": { "operands": [], - "prefix": "FA47", - "tlb": "#FA47" + "prefix": "FA55", + "tlb": "#FA55" }, "control_flow": { "branches": [], @@ -65454,32 +66774,40 @@ }, "doc": { "category": "app_addr", - "description": "A quiet version of primitive `REWRITEVARADDR`.", - "fift": "REWRITEVARADDRQ", + "description": "A quiet version of primitive `STOPTSTDADDR`.", + "fift": "STOPTSTDADDRQ", "fift_examples": [], "gas": "26", - "opcode": "FA47", - "stack": "s - x s' -1 or 0" + "opcode": "FA55", + "stack": "a b - b' 0 or a b -1" }, "implementation": [ { "file": "tonops.cpp", - "function_name": "exec_rewrite_message_addr", - "line": 1669, - "path": "https://raw.githubusercontent.com/ton-blockchain/ton/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/vm/tonops.cpp" + "function_name": "exec_store_opt_std_address", + "line": 1855, + "path": "https://raw.githubusercontent.com/ton-blockchain/ton/f58297f1b668c7b49e8b30b65062951ca7c18acc/crypto/vm/tonops.cpp" } ], - "mnemonic": "REWRITEVARADDRQ", - "since_version": 0, + "mnemonic": "STOPTSTDADDRQ", + "since_version": 12, "value_flow": { "inputs": { "registers": [], "stack": [ { - "name": "s", + "name": "a", "type": "simple", "value_types": [ - "Slice" + "Slice", + "Null" + ] + }, + { + "name": "b", + "type": "simple", + "value_types": [ + "Builder" ] } ] @@ -65490,23 +66818,32 @@ { "match": [ { - "stack": [], + "stack": [ + { + "name": "b2", + "type": "simple", + "value_types": [ + "Builder" + ] + } + ], "value": 0 }, { "stack": [ { - "name": "x", + "name": "a", "type": "simple", "value_types": [ - "Integer" + "Slice", + "Null" ] }, { - "name": "s'", + "name": "b", "type": "simple", "value_types": [ - "Slice" + "Builder" ] } ],