# Standard Library
Standard library is a set of built-in functions, structures and variables.
The version of the Standard library in the script is set by the
We recommend to use version 6 or 7 of the Standard Library when developing applications.
Previous versions are listed in the [Ride v5, v4, v3] Previous Versions of Standard Library article.
# Key Features of Version 7
Version 7 is enabled by feature #19 “Block Reward Distribution”.
rewards: List[(Address, Int)] field to the BlockInfo structure which is returned by the blockInfoByHeight built-in function.
# Key Features of Version 6
Version 6 is enabled by feature #17 “Ride V6, MetaMask support”.
# MetaMask Support
- The addressFromPublicKey function accepts both Waves account public key (32 bytes) and the MetaMask account public key (64 bytes) and returns address in Waves format (26 bytes).
- The transferTransactionById function returns an Ethereum transaction by its ID if the transaction is interpreted as a Transfer transaction. The
proofsarray contains 8 empty values.
More about MetaMask support on the Waves blockchain
# Changes in Functions
The maximum complexity of a callable function of a dApp script in Standard library version 6 is changed to 52,000.
The maximum total complexity of all callable functions and asset scripts within an Invoke Script transaction depends on the version of Standard library in the first dApp script invoked:
- If the first dApp script uses version 6, the total complexity is limited by 52 000.
- If the first dApp script uses version 5, the total complexity is limited by 26 000. If script version 6 functions are invoked next, their complexity can exceed 10,000 and is limited only by the total complexity of the transaction.
The sender's account script complexity is not included in that limit.
The maximum total number of
LeaseCancelscript actions executed by all callable functions in a single transaction is 100.
The maximum total number of
SponsorFeescript actions executed by all callable functions in a single transaction is 30.
Callable functions no longer accept arguments of type Union.
Added the following built-in functions:
Changed the limitation on the second parameter of
- for string functions a number from 0 to 32,767 (the maximum string length) is allowed,
- for byte array functions a number from 0 to 165 947 (the maximum byte array length) is allowed.
Changed the limitations on input and output data size for the built-in string functions makeString and split; their complexity reduced to 1. Added the range of similar functions with different complexity depending on the data size.
Changed the complexity of certain built-in functions. The complexity is given in the Built-in functions article.
- New complexity estimation rules reduce overall script complexity.