Functions
let int test = int 20 + int 10 - int 5;let int test = sub(add(int 20, int 10), int 5);let int test = int 20;
add(test, int 10); #Invalid, as int 30 is returned and unused
test.add(int 10); #Valid
Arithmetic functions
add(mixed,...) returns mixed
let nat test = add(nat 1, nat 2, nat 3, nat 4); # Returns nat 10add(int, int, ...) => int
add(int, nat, ...) => int
add(nat, int, ...) => int
add(nat, nat, ...) => nat
add(mutez, mutez, ...) => mutez
add(timestamp, int, ...) => timestamp
add(int, timestamp, ...) => timestampsub(mixed,...) returns mixed
mul(mixed,...) returns mixed
div(mixed,...) returns mixed
mod(mixed,...) returns mixed
abs(int) returns nat
neg(nat|int) returns int
sqr(mutez|nat|int) returns [same as input]
String & Byte functions
concat(bytes|string,...) returns [same as input]
concat_ws(string seperator, string...) returns string
slice(string|bytes, nat offset, nat length) returns [same as first argument]
hash(bytes, ?algo) returns bytes
pack(data) return bytes
unpack(bytes, type) return mixed
verify(bytes, signature, key) returns bool
Map/Set/List functions
in(map|bmap|set, mixed val) returns bool
length(map|list|set) returns nat
get(map|bmap, mixed val) returns mixed
push(map|bmap, mixed key, mixed val) no return
push(set, mixed val) no return
drop(map|bmap|set, mixed val) no return
pop(list) returns mixed
On-chain functions
transfer(address|pkh|key_hash|key|contract *, mutez, ?data) no return
delegate(?key_hash) no return
Other functions
isset(?mixed) returns bool
none(type) returns ?type
Last updated
Was this helpful?