diff --git a/gitlab-pages/docs/reference/current.md b/gitlab-pages/docs/reference/current.md index a08916711..58c668889 100644 --- a/gitlab-pages/docs/reference/current.md +++ b/gitlab-pages/docs/reference/current.md @@ -612,7 +612,12 @@ Cause the contract to fail with an error message. > ⚠ Using this currently requires in general a type annotation on the > `failwith` call. - + +Note that `Current.failwith` is deprecated. Use `Tezos.failwith` or `failwith` instead. + + +Note that `Current.failwith` is deprecated. Use `Tezos.failwith` or `failwith` instead. + @@ -713,10 +718,19 @@ val transaction : 'parameter -> mutez -> 'parameter contract -> operation let transaction: 'parameter -> mutez -> contract('parameter) -> operation -Create a transaction to a contract or account. +Transfer `tez` to an account, or run code of another smart contract. To indicate an account, use `unit` as `parameter`. + +Note that `transaction` is deprecated. Please use `Tezos.transaction` instead. + + +Note that `transaction` is deprecated. Please use `Tezos.transaction` instead. + + +Note that `transaction` is deprecated. Please use `Tezos.transaction` instead. + function set_delegate : option(key_hash) -> operation @@ -728,9 +742,28 @@ val set_delegate : key_hash option -> operation let set_delegate: option(key_hash) => operation -Create a delegation. +Modify the +(delegate)[http://tezos.gitlab.io/user/glossary.html?highlight=delegate#delegate] +of the current contract. -See also: http://tezos.gitlab.io/user/glossary.html?highlight=delegate#delegate +The operation fails when: +- the delegate is the same as current delegate +- the keyhash is not of a registered delegate + +Use `None` to withdraw the current delegate. + + +Note that `set_delegate` is deprecated. Please use `Tezos.set_delegate` +instead. + + +Note that `Operation.set_delegate` is deprecated. Please use +`Tezos.set_delegate` instead. + + +Note that `Operation.set_delegate` is deprecated. Please use +`Tezos.set_delegate` instead. + function get_contract_opt : address -> option(contract('parameter)) @@ -747,6 +780,19 @@ Get a contract from an address. When no contract is found or the contract doesn't match the type, `None` is returned. + +Note that `get_contract` and `get_contract_opt` are deprecated. Please use +`Tezos.get_contract_opt` instead. + + +Note that `Operation.get_contract` and `Operation.get_contract_opt` are +deprecated. Please use `Tezos.get_contract_opt` instead. + + +Note that `Operation.get_contract` and `Operation.get_contract_opt` are +deprecated. Please use `Tezos.get_contract_opt` instead. + + function get_entrypoint_opt : string -> address -> option(contract('parameter)) @@ -763,3 +809,18 @@ Entrypoints are written in the form of: `%entrypoint`. When no contract is found or the contract doesn't match the type, `None` is returned. + + +Note that `get_entrypoint` and `get_entrypoint_opt` are deprecated. Please use +`Tezos.get_entrypoint_opt` instead. + + + +Note that `Operation.get_entrypoint` and `Operation.get_entrypoint_opt` are +deprecated. Please use `Tezos.get_entrypoint_opt` instead. + + + +Note that `Operation.get_entrypoint` and `Operation.get_entrypoint_opt` are +deprecated. Please use `Tezos.get_entrypoint_opt` instead. + \ No newline at end of file diff --git a/gitlab-pages/docs/reference/toplevel.md b/gitlab-pages/docs/reference/toplevel.md index ce19cfa08..b55f64286 100644 --- a/gitlab-pages/docs/reference/toplevel.md +++ b/gitlab-pages/docs/reference/toplevel.md @@ -22,6 +22,8 @@ let is_nat: int => option(nat) Convert an `int` to a `nat` if possible. +Note that `Michelson.is_nat` is deprecated. Please use `is_nat` instead. + function abs: int -> nat diff --git a/src/passes/operators/operators.ml b/src/passes/operators/operators.ml index 9e493d00b..1cf4407ae 100644 --- a/src/passes/operators/operators.ml +++ b/src/passes/operators/operators.ml @@ -302,7 +302,6 @@ module Concrete_to_imperative = struct | "failwith" -> ok C_FAILWITH | "Operation.transaction" -> ok C_CALL (* Deprecated *) - | "Tezos.set_delegate" -> ok C_SET_DELEGATE (* Deprecated *) | "Operation.set_delegate" -> ok C_SET_DELEGATE (* Deprecated *) | "Operation.get_contract" -> ok C_CONTRACT (* Deprecated *) | "Operation.get_contract_opt" -> ok C_CONTRACT_OPT (* Deprecated *) @@ -353,9 +352,9 @@ module Concrete_to_imperative = struct (* Loop module *) | "Loop.fold_while" -> ok C_FOLD_WHILE (* Deprecated *) - | "Loop.resume" -> ok C_FOLD_CONTINUE + | "Loop.resume" -> ok C_FOLD_CONTINUE (* Deprecated *) | "continue" -> ok C_FOLD_CONTINUE (* Deprecated *) - | "Loop.stop" -> ok C_FOLD_STOP + | "Loop.stop" -> ok C_FOLD_STOP (* Deprecated *) | "stop" -> ok C_FOLD_STOP (* Deprecated *) (* Others *)