Built-in functions

tr>
Function Name Cost(complexity) Description Params Return Type
fraction 1 Multiply and dividion with big integer intermediate representation
value Int multiplyer
numerator Int multiplyer
denominator Int divisor
Int
size 1 Size of bytes str
byteVector ByteVector vector
Int
toBytes 1 Bytes array representation
b Boolean value
ByteVector
toBytes 1 Bytes array representation
n Int value
ByteVector
toBytes 1 Bytes array representation
s String value
ByteVector
take 1 Take firsts bytes subvector
xs ByteVector vector
number Int Bytes number
ByteVector
drop 1 Skip firsts bytes
xs ByteVector vector
number Int Bytes number
ByteVector
takeRight 19 Take vector tail
@xs ByteVector vector
@number Int taking size
ByteVector
dropRight 19 Cut vectors tail
@xs ByteVector vector
@number Int cuting size
ByteVector
size 1 Scting size in characters
xs String string
Int
toString 1 String representation
b Boolean value
String
toString 1 String representation
n Int value
String
take 1 Take string prefix
xs String sctring
number Int prefix size in characters
String
drop 1 Remmove sring prefix
xs String string
number Int prefix size
String
takeRight 19 Take string suffix
@xs String String
@number Int suffix size in characters
String
dropRight 19 Remove string suffix
@xs String string
@number Int suffix size in characters
String
_isInstanceOf 1 Internal function to check value type
obj T value
of String type name
Boolean
isDefined 1 Check the value is defined
@a OPTION[T] Option value
Boolean
extract 13 Extract value from option or fail
@a OPTION[T] Optional value
T
throw 1 Fail script
err String Error message
Nothing
throw 1 Fail script
Nothing
getElement 2 Get list element by position
arr LIST[T] list
pos Int element position
T
size 2 Size of list
arr LIST[T] list
Int
value 13 Extract value from option or fail
@a OPTION[T] Optional value
T
valueWithErrorMessage 13 Extract value from option or fail with message
@a OPTION[T] Optional value
@msg String Error message
T
extractWithErrorMessage 13 Extract value from option or fail with message
@a OPTION[T] Optional value
@msg String Error message
T
cons 2 Construct a new List[T]
head A head
tail LIST[B] tail
LIST[]
toUtf8String 20 Convert UTF8 bytes to string
u ByteVector utf8
String
toInt 10 Deserialize big endian 8-bytes value
bin ByteVector 8-bytes BE binaries
Int
toInt 10 Deserialize big endian 8-bytes value
bin ByteVector 8-bytes BE binaries
offet Int bytes offset
Int
indexOf 20 index of substring
str String String for analize
substr String String for searching
OPTION[Int]
indexOf 20 index of substring after offset
str String String for analize
substr String String for searching
offset Int offset
OPTION[Int]
split 100 split string by separator
str String String for splitting
separator String separator
LIST[String]
parseInt 20 parse string to integer
str String String for parsing
OPTION[Int]
parseIntValue 20 parse string to integer with fail on errors
str String String for parsing
Int
pow 100 Math pow
base Int bases value
bp Int bases decimal
exponent Int exponents value
ep Int exponents decimal
rp Int results decimal
round Down Up HalfUp HalfDown Ceiling Floor HalfEven round method
Int
log 100 Math log
value Int value
ep Int value decimal
base Int bases value
bp Int bases decimal
rp Int results decimal
round Down Up HalfUp HalfDown Ceiling Floor HalfEven round method
Int
keccak256 10 256 bit Keccak/SHA-3/TIPS-202
bytes ByteVector value
ByteVector
blake2b256 10 256 bit BLAKE
bytes ByteVector value
ByteVector
sha256 10 256 bit SHA-2
bytes ByteVector value
ByteVector
sigVerify 100 check signature
message ByteVector value
sig ByteVector signature
pub ByteVector public key
Boolean
toBase58String 10 Base58 encode
bytes ByteVector value
String
fromBase58String 10 Base58 decode
str String base58 encoded string
ByteVector
toBase64String 10 Base64 encode
bytes ByteVector value
String
fromBase64String 10 Base64 decode
str String base64 encoded string
ByteVector
rsaVerify 100 check RSA signature
digest NOALG MD5 SHA1 SHA224 SHA256 SHA384 SHA512 SHA3224 SHA3256 SHA3384 SHA3512 digest algorithm
message ByteVector value
sig ByteVector signature
pub ByteVector public key
Boolean
checkMerkleProof 30 Check validity of merkle tree proof
merkleRoot ByteVector root hash of merkle tree
merkleProof ByteVector proof bytes
valueBytes ByteVector bytes of value to be prooven
Boolean
toBase16String 10 Base16 encode
bytes ByteVector value
String
fromBase16String 10 Base16 decode
str String base 16 encoded string
ByteVector
transactionHeightById 100 get height when transaction was stored to blockchain
id ByteVector transaction Id
OPTION[Int]
getInteger 100 get data from the account state
addressOrAlias Address Alias account
key String key
OPTION[Int]
getBoolean 100 get data from the account state
addressOrAlias Address Alias account
key String key
OPTION[Boolean]
getBinary 100 get data from the account state
addressOrAlias Address Alias account
key String key
OPTION[ByteVector]
getString 100 get data from the account state
addressOrAlias Address Alias account
key String key
OPTION[String]
getInteger 10 Find and extract data by key
data LIST[DataEntry] DataEntry vector, usally tx.data
key String key
OPTION[Int]
getBoolean 10 Find and extract data by key
data LIST[DataEntry] DataEntry vector, usally tx.data
key String key
OPTION[Boolean]
getBinary 10 Find and extract data by key
data LIST[DataEntry] DataEntry vector, usally tx.data
key String key
OPTION[ByteVector]
getString 10 Find and extract data by key
data LIST[DataEntry] DataEntry vector, usally tx.data
key String key
OPTION[String]
getInteger 30 Extract data by index
@data LIST[DataEntry] DataEntry vector, usally tx.data
@index Int index
OPTION[Int]
getBoolean 30 Extract data by index
@data LIST[DataEntry] DataEntry vector, usally tx.data
@index Int index
OPTION[Boolean]
getBinary 30 Extract data by index
@data LIST[DataEntry] DataEntry vector, usally tx.data
@index Int index
OPTION[ByteVector]
getString 30 Extract data by index
@data LIST[DataEntry] DataEntry vector, usally tx.data
@index Int index
OPTION[String]
addressFromPublicKey 82 Convert public key to account address
@publicKey ByteVector public key
Address
addressFromString 124 Decode account address
@string String string address represntation
OPTION[Address]
addressFromRecipient 100 Extract address or lookup alias
AddressOrAlias Address Alias address or alias, usually tx.recipient
Address
assetBalance 100 get asset balance for account
addressOrAlias Address Alias account
assetId OPTION[ByteVector] assetId (WAVES if none)
Int
wavesBalance 109 get WAVES balanse for account
@addressOrAlias Address Alias account
Int
getIntegerValue 100 get data from the account state (fail on error)
@addressOrAlias Address Alias account
@key String key
Int
getBooleanValue 100 get data from the account state (fail on error)
@addressOrAlias Address Alias account
@key String key
Boolean
getBinaryValue 100 get data from the account state (fail on error)
@addressOrAlias Address Alias account
@key String key
ByteVector
getStringValue 100 get data from the account state (fail on error)
@addressOrAlias Address Alias account
@key String key
String
getIntegerValue 10 Find and extract data by key (fail on error)
@data LIST[DataEntry] DataEntry vector, usally tx.data
@key String key
Int
getBooleanValue 10 Find and extract data by key (fail on error)
@data LIST[DataEntry] DataEntry vector, usally tx.data
@key String key
Boolean
getBinaryValue 10 Find and extract data by key (fail on error)
@data LIST[DataEntry] DataEntry vector, usally tx.data
@key String key
ByteVector
getStringValue 10 Find and extract data by key (fail on error)
@data LIST[DataEntry] DataEntry vector, usally tx.data
@key String key
String
getIntegerValue 30 Extract data by index (fail on error)
@@data LIST[DataEntry] DataEntry vector, usally tx.data
@@index Int index
Int
getBooleanValue 30 Extract data by index (fail on error)
@@data LIST[DataEntry] DataEntry vector, usally tx.data
@@index Int index
Boolean
getBinaryValue 30 Extract data by index (fail on error)
@@data LIST[DataEntry] DataEntry vector, usally tx.data
@@index Int index
ByteVector
getStringValue 30 Extract data by index (fail on error)
@@data LIST[DataEntry] DataEntry vector, usally tx.data
@@index Int index
String
addressFromStringValue 124 Decode account address (fail on error)
@@string String string address represntation
Address
assetInfo 100 get asset info by id
id ByteVector asset Id
OPTION[Asset]
blockInfoByHeight 100 Lookup block by height and return info if it exists
height Int block height
OPTION[BlockInfo]
transferTransactionById 100 Lookup transfer transaction
id ByteVector transfer transaction id
TransferTransaction

results matching ""

    No results matching ""