Documentation

This commit is contained in:
Sander Spies 2020-04-03 14:51:16 +02:00
parent 13799b3181
commit d0ccaabf3e
3 changed files with 69 additions and 7 deletions

View File

@ -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.
<Syntax syntax="cameligo">
Note that `Current.failwith` is deprecated. Use `Tezos.failwith` or `failwith` instead.
</Syntax>
<Syntax syntax="reasonligo">
Note that `Current.failwith` is deprecated. Use `Tezos.failwith` or `failwith` instead.
</Syntax>
<Syntax syntax="pascaligo">
@ -713,10 +718,19 @@ val transaction : 'parameter -> mutez -> 'parameter contract -> operation
let transaction: 'parameter -> mutez -> contract('parameter) -> operation
</SyntaxTitle>
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`.
<Syntax syntax="pascaligo">
Note that `transaction` is deprecated. Please use `Tezos.transaction` instead.
</Syntax>
<Syntax syntax="cameligo">
Note that `transaction` is deprecated. Please use `Tezos.transaction` instead.
</Syntax>
<Syntax syntax="reasonligo">
Note that `transaction` is deprecated. Please use `Tezos.transaction` instead.
</Syntax>
<SyntaxTitle syntax="pascaligo">
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
</SyntaxTitle>
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.
<Syntax syntax="pascaligo">
Note that `set_delegate` is deprecated. Please use `Tezos.set_delegate`
instead.
</Syntax>
<Syntax syntax="cameligo">
Note that `Operation.set_delegate` is deprecated. Please use
`Tezos.set_delegate` instead.
</Syntax>
<Syntax syntax="reasonligo">
Note that `Operation.set_delegate` is deprecated. Please use
`Tezos.set_delegate` instead.
</Syntax>
<SyntaxTitle syntax="pascaligo">
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.
<Syntax syntax="pascaligo">
Note that `get_contract` and `get_contract_opt` are deprecated. Please use
`Tezos.get_contract_opt` instead.
</Syntax>
<Syntax syntax="cameligo">
Note that `Operation.get_contract` and `Operation.get_contract_opt` are
deprecated. Please use `Tezos.get_contract_opt` instead.
</Syntax>
<Syntax syntax="reasonligo">
Note that `Operation.get_contract` and `Operation.get_contract_opt` are
deprecated. Please use `Tezos.get_contract_opt` instead.
</Syntax>
<SyntaxTitle syntax="pascaligo">
function get_entrypoint_opt : string -> address -> option(contract('parameter))
</SyntaxTitle>
@ -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.
<Syntax syntax="pascaligo">
Note that `get_entrypoint` and `get_entrypoint_opt` are deprecated. Please use
`Tezos.get_entrypoint_opt` instead.
</Syntax>
<Syntax syntax="cameligo">
Note that `Operation.get_entrypoint` and `Operation.get_entrypoint_opt` are
deprecated. Please use `Tezos.get_entrypoint_opt` instead.
</Syntax>
<Syntax syntax="reasonligo">
Note that `Operation.get_entrypoint` and `Operation.get_entrypoint_opt` are
deprecated. Please use `Tezos.get_entrypoint_opt` instead.
</Syntax>

View File

@ -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.
<SyntaxTitle syntax="pascaligo">
function abs: int -> nat
</SyntaxTitle>

View File

@ -300,7 +300,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 *)
@ -350,9 +349,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 *)