diff --git a/crypto/func/auto-tests/legacy_tests/bsc-bridge-collector/stdlib.fc b/crypto/func/auto-tests/legacy_tests/bsc-bridge-collector/stdlib.fc index d5d5c8b8..d6b8b111 100644 --- a/crypto/func/auto-tests/legacy_tests/bsc-bridge-collector/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/bsc-bridge-collector/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/config/stdlib.fc b/crypto/func/auto-tests/legacy_tests/config/stdlib.fc index 0b98eeb4..099533b7 100644 --- a/crypto/func/auto-tests/legacy_tests/config/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/config/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/dns-collection/stdlib.fc b/crypto/func/auto-tests/legacy_tests/dns-collection/stdlib.fc index 40bac583..1b43e221 100644 --- a/crypto/func/auto-tests/legacy_tests/dns-collection/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/dns-collection/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/elector/stdlib.fc b/crypto/func/auto-tests/legacy_tests/elector/stdlib.fc index b862b5ef..41ab3382 100644 --- a/crypto/func/auto-tests/legacy_tests/elector/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/elector/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/eth-bridge-multisig/stdlib.fc b/crypto/func/auto-tests/legacy_tests/eth-bridge-multisig/stdlib.fc index 1d144040..04b6e4d3 100644 --- a/crypto/func/auto-tests/legacy_tests/eth-bridge-multisig/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/eth-bridge-multisig/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/gg-marketplace/stdlib.fc b/crypto/func/auto-tests/legacy_tests/gg-marketplace/stdlib.fc index ba9177e9..6ae2a28d 100644 --- a/crypto/func/auto-tests/legacy_tests/gg-marketplace/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/gg-marketplace/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; @@ -212,4 +212,4 @@ builder store_coins(builder b, int x) asm "STVARUINT16"; int equal_slices (slice a, slice b) asm "SDEQ"; int builder_null?(builder b) asm "ISNULL"; -builder store_builder(builder to, builder from) asm "STBR"; \ No newline at end of file +builder store_builder(builder to, builder from) asm "STBR"; diff --git a/crypto/func/auto-tests/legacy_tests/jetton-minter/imports/stdlib.fc b/crypto/func/auto-tests/legacy_tests/jetton-minter/imports/stdlib.fc index 05c3a4c0..f04be0b6 100644 --- a/crypto/func/auto-tests/legacy_tests/jetton-minter/imports/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/jetton-minter/imports/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/jetton-wallet/imports/stdlib.fc b/crypto/func/auto-tests/legacy_tests/jetton-wallet/imports/stdlib.fc index 05c3a4c0..f04be0b6 100644 --- a/crypto/func/auto-tests/legacy_tests/jetton-wallet/imports/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/jetton-wallet/imports/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/nft-collection/stdlib.fc b/crypto/func/auto-tests/legacy_tests/nft-collection/stdlib.fc index ba9177e9..6ae2a28d 100644 --- a/crypto/func/auto-tests/legacy_tests/nft-collection/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/nft-collection/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; @@ -212,4 +212,4 @@ builder store_coins(builder b, int x) asm "STVARUINT16"; int equal_slices (slice a, slice b) asm "SDEQ"; int builder_null?(builder b) asm "ISNULL"; -builder store_builder(builder to, builder from) asm "STBR"; \ No newline at end of file +builder store_builder(builder to, builder from) asm "STBR"; diff --git a/crypto/func/auto-tests/legacy_tests/nominator-pool/stdlib.fc b/crypto/func/auto-tests/legacy_tests/nominator-pool/stdlib.fc index 0431d32d..cddb5ae0 100644 --- a/crypto/func/auto-tests/legacy_tests/nominator-pool/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/nominator-pool/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,10 +202,10 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; builder store_coins(builder b, int x) asm "STVARUINT16"; -(slice, int) load_coins(slice s) asm( -> 1 0) "LDVARUINT16"; \ No newline at end of file +(slice, int) load_coins(slice s) asm( -> 1 0) "LDVARUINT16"; diff --git a/crypto/func/auto-tests/legacy_tests/storage/stdlib.fc b/crypto/func/auto-tests/legacy_tests/storage/stdlib.fc index a33d3942..70b5d61d 100644 --- a/crypto/func/auto-tests/legacy_tests/storage/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/storage/stdlib.fc @@ -209,7 +209,7 @@ cell get_data() asm "c4 PUSH"; */ /// Usually `c3` has a continuation initialized by the whole code of the contract. It is used for function calls. /// The primitive returns the current value of `c3`. -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; /// Updates the current value of `c3`. Usually, it is used for updating smart contract code in run-time. /// Note that after execution of this primitive the current code @@ -218,7 +218,7 @@ cont get_c3() impure asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; /// Transforms a `slice` [s] into a simple ordinary continuation `c`, with `c.code = s` and an empty stack and savelist. -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; /*-- # Gas related primitives @@ -609,7 +609,7 @@ int random() impure asm "RANDU256"; /// Generates a new pseudo-random integer z in the range 0..range−1 (or range..−1, if range < 0). More precisely, an unsigned random value x is generated as in random; then z := x * range / 2^256 is computed. int rand(int range) impure asm "RAND"; /// Returns the current random seed as an unsigned 256-bit Integer. -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; /// Sets the random seed to unsigned 256-bit seed. () set_seed(int) impure asm "SETRAND"; /// Mixes unsigned 256-bit integer x into the random seed r by setting the random seed to sha256 of the concatenation of two 32-byte strings: the first with the big-endian representation of the old seed r, and the second with the big-endian representation of x. diff --git a/crypto/func/auto-tests/legacy_tests/tact-examples/stdlib.fc b/crypto/func/auto-tests/legacy_tests/tact-examples/stdlib.fc index 3531608a..d5bd148e 100644 --- a/crypto/func/auto-tests/legacy_tests/tact-examples/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/tact-examples/stdlib.fc @@ -209,7 +209,7 @@ cell get_data() asm "c4 PUSH"; -} ;;; Usually `c3` has a continuation initialized by the whole code of the contract. It is used for function calls. ;;; The primitive returns the current value of `c3`. -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; ;;; Updates the current value of `c3`. Usually, it is used for updating smart contract code in run-time. ;;; Note that after execution of this primitive the current code @@ -218,7 +218,7 @@ cont get_c3() impure asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; ;;; Transforms a `slice` [s] into a simple ordinary continuation `c`, with `c.code = s` and an empty stack and savelist. -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; {--- # Gas related primitives @@ -609,7 +609,7 @@ int random() impure asm "RANDU256"; ;;; Generates a new pseudo-random integer z in the range 0..range−1 (or range..−1, if range < 0). More precisely, an unsigned random value x is generated as in random; then z := x * range / 2^256 is computed. int rand(int range) impure asm "RAND"; ;;; Returns the current random seed as an unsigned 256-bit Integer. -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; ;;; Sets the random seed to unsigned 256-bit seed. () set_seed(int) impure asm "SETRAND"; ;;; Mixes unsigned 256-bit integer x into the random seed r by setting the random seed to sha256 of the concatenation of two 32-byte strings: the first with the big-endian representation of the old seed r, and the second with the big-endian representation of x. diff --git a/crypto/func/auto-tests/legacy_tests/tele-nft-item/stdlib.fc b/crypto/func/auto-tests/legacy_tests/tele-nft-item/stdlib.fc index 45d01f32..7304a80e 100644 --- a/crypto/func/auto-tests/legacy_tests/tele-nft-item/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/tele-nft-item/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/uni-lock-wallet/stdlib.fc b/crypto/func/auto-tests/legacy_tests/uni-lock-wallet/stdlib.fc index 266b69ac..cddb5ae0 100644 --- a/crypto/func/auto-tests/legacy_tests/uni-lock-wallet/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/uni-lock-wallet/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/wallet-v4/stdlib.fc b/crypto/func/auto-tests/legacy_tests/wallet-v4/stdlib.fc index 05c3a4c0..f04be0b6 100644 --- a/crypto/func/auto-tests/legacy_tests/wallet-v4/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/wallet-v4/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/func/auto-tests/legacy_tests/whales-nominators/stdlib.fc b/crypto/func/auto-tests/legacy_tests/whales-nominators/stdlib.fc index dcc5f423..e69d9171 100644 --- a/crypto/func/auto-tests/legacy_tests/whales-nominators/stdlib.fc +++ b/crypto/func/auto-tests/legacy_tests/whales-nominators/stdlib.fc @@ -53,9 +53,9 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI cell get_data() asm "c4 PUSH"; () set_data(cell c) impure asm "c4 POP"; -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; () accept_message() impure asm "ACCEPT"; () set_gas_limit(int limit) impure asm "SETGASLIMIT"; @@ -202,7 +202,7 @@ int cell_null?(cell c) asm "ISNULL"; int random() impure asm "RANDU256"; int rand(int range) impure asm "RAND"; -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; int set_seed() impure asm "SETRAND"; () randomize(int x) impure asm "ADDRAND"; () randomize_lt() impure asm "LTIME" "ADDRAND"; diff --git a/crypto/smartcont/stdlib.fc b/crypto/smartcont/stdlib.fc index 7049c6fb..57ae7c6b 100644 --- a/crypto/smartcont/stdlib.fc +++ b/crypto/smartcont/stdlib.fc @@ -177,6 +177,12 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI The primitives below may be useful for computing storage fees of user-provided data. */ +/// A non-quiet version of [compute_data_size?] that throws a cell overflow exception (`8`) on failure. +(int, int, int) compute_data_size(cell c, int max_cells) impure asm "CDATASIZE"; + +/// A non-quiet version of [slice_compute_data_size?] that throws a cell overflow exception (`8`) on failure. +(int, int, int) slice_compute_data_size(slice s, int max_cells) impure asm "SDATASIZE"; + /// Returns `(x, y, z, -1)` or `(null, null, null, 0)`. /// Recursively computes the count of distinct cells `x`, data bits `y`, and cell references `z` /// in the DAG rooted at `cell` [c], effectively returning the total storage used by this DAG taking into account @@ -186,18 +192,12 @@ int check_data_signature(slice data, slice signature, int public_key) asm "CHKSI /// The total count of visited cells `x` cannot exceed non-negative [max_cells]; /// otherwise the computation is aborted before visiting the `(max_cells + 1)`-st cell and /// a zero flag is returned to indicate failure. If [c] is `null`, returns `x = y = z = 0`. -(int, int, int) compute_data_size(cell c, int max_cells) impure asm "CDATASIZE"; +(int, int, int, int) compute_data_size?(cell c, int max_cells) asm "CDATASIZEQ NULLSWAPIFNOT2 NULLSWAPIFNOT"; /// Similar to [compute_data_size?], but accepting a `slice` [s] instead of a `cell`. /// The returned value of `x` does not take into account the cell that contains the `slice` [s] itself; /// however, the data bits and the cell references of [s] are accounted for in `y` and `z`. -(int, int, int) slice_compute_data_size(slice s, int max_cells) impure asm "SDATASIZE"; - -/// A non-quiet version of [compute_data_size?] that throws a cell overflow exception (`8`) on failure. -(int, int, int, int) compute_data_size?(cell c, int max_cells) asm "CDATASIZEQ NULLSWAPIFNOT2 NULLSWAPIFNOT"; - -/// A non-quiet version of [slice_compute_data_size?] that throws a cell overflow exception (8) on failure. -(int, int, int, int) slice_compute_data_size?(cell c, int max_cells) asm "SDATASIZEQ NULLSWAPIFNOT2 NULLSWAPIFNOT"; +(int, int, int, int) slice_compute_data_size?(slice s, int max_cells) asm "SDATASIZEQ NULLSWAPIFNOT2 NULLSWAPIFNOT"; /// Throws an exception with exit_code excno if cond is not 0 (commented since implemented in compilator) // () throw_if(int excno, int cond) impure asm "THROWARGIF"; @@ -224,7 +224,7 @@ cell get_data() asm "c4 PUSH"; */ /// Usually `c3` has a continuation initialized by the whole code of the contract. It is used for function calls. /// The primitive returns the current value of `c3`. -cont get_c3() impure asm "c3 PUSH"; +cont get_c3() asm "c3 PUSH"; /// Updates the current value of `c3`. Usually, it is used for updating smart contract code in run-time. /// Note that after execution of this primitive the current code @@ -233,7 +233,7 @@ cont get_c3() impure asm "c3 PUSH"; () set_c3(cont c) impure asm "c3 POP"; /// Transforms a `slice` [s] into a simple ordinary continuation `c`, with `c.code = s` and an empty stack and savelist. -cont bless(slice s) impure asm "BLESS"; +cont bless(slice s) asm "BLESS"; /*** # Gas related primitives @@ -624,7 +624,7 @@ int random() impure asm "RANDU256"; /// Generates a new pseudo-random integer z in the range 0..range−1 (or range..−1, if range < 0). More precisely, an unsigned random value x is generated as in random; then z := x * range / 2^256 is computed. int rand(int range) impure asm "RAND"; /// Returns the current random seed as an unsigned 256-bit Integer. -int get_seed() impure asm "RANDSEED"; +int get_seed() asm "RANDSEED"; /// Sets the random seed to unsigned 256-bit seed. () set_seed(int) impure asm "SETRAND"; /// Mixes unsigned 256-bit integer x into the random seed r by setting the random seed to sha256 of the concatenation of two 32-byte strings: the first with the big-endian representation of the old seed r, and the second with the big-endian representation of x.