Basic
Abs
Name: Abs
Type: integer
Get the absolute value of an integer
source
integer
yes
source abs: integer = Abs {
source: -5
};
abs == 5Max
Name: Max
Type: integer
Get the largest item from a sequence of integers
sequence
list<integer>
yes
source max: integer = Max {
sequence: list(1, 2, 3)
};
max == 3Min
Name: Min
Type: integer
Get the smallest item from a sequence of integers
sequence
list<integer>
yes
source min: integer = Min {
sequence: list(1, 2, 3)
};
min == 1Sum
Name: Sum
Type: integer
Sum over a sequence of integers
sequence
list<integer>
yes
Average
Name: Average
Type: integer
Get the average of a sequence of integers.
sequence
list<integer>
yes
Median
Name: Median
Type: integer
Get the median of a sequence of integers.
sequence
list<integer>
yes
Flatten
Name: Flatten
Type: list<varies>
Flatten a list of lists.
sequence
list<list<varies>>
yes
Unique
Name: Unique
Type: list<varies>
Returns a version of the list where each element appears only once.
sequence
list<varies>
yes
Len
Name: Len
Type: integer
Get the length of a list
sequence
list<varies>
yes
Contains
Name: Contains
Type: boolean
Check whether an item is contained within a list
sequence
list<varies>
yes
item
varies
yes
Zip
Name: Zip
Type: list<tuple<varies, varies>>
"Zip" together two lists of the same type (similar to python's zip method).
If the optional truncate is true (defaults to false), the result's length is the minimum of the two. Otherwise, the two lists have to be the same length.
The return value would a list of tuples, each tuple holding 2 values, one from each list.
Unless truncate is set to true, Zip will fail if the two lists are not the same lengths.
first
list<varies>
yes
second
list<varies>
yes
truncate
boolean
no
Aggregate
Name: Aggregate
Type: list<varies>
Aggregates the values of a data source over a specified window
source
varies
yes
blocks
integer
yes
Range
Name: Range
Type: list<integer>
Generate a list of integers within a specified range.
start
integer
yes
stop
integer
yes
step
integer
no
Keccak256
Name: Keccak256
Type: bytes
Calculates the Keccak256 digest of a bytes data source.
input
bytes
yes
Map Contains
Name: MapContains
Type: boolean
Checks if an items exists in a given map
map
map
yes
item
varies
yes
Encode
Name: Encode
Type: bytes
Encode given parameters for a given function signature using ABI.encode
data
tuple<varies>
yes
signature
string
yes
Decode
Name: Decode
Type: tuple<varies>
0Decode given bytes to parameters of a given function signature using ABI.decode
data
bytes
yes
signature
string
yes
Group
Name: Group
Type: map<varies | tuple<varies>, list<tuple<varies>>>
Group list items by a given criterion based on selected indices.
sequence
list<tuple<varies>>
yes
by
integer | tuple<integer>
yes
Last updated