# [Ride v5, v4, v3] Previous Versions of Standard Library
⚠️ We recommend to use Standard library version 6 for application development.
Previous versions:
- Version 5 is enabled by feature #16 “Ride V5, dApp-to-dApp invocations”.
- Version 4 is enabled by feature #15 “Ride V4, VRF, Protobuf, Failed transactions”.
- Version 3.
The table below shows the version differences.
# | Version 3 | Version 4 | Version 5 |
---|---|---|---|
Script | Added: • dApp script • Directives • Annotations • Custom functions • FOLD<N> macro | Added: • dApp-to-dApp invocation | |
Data types | Added: • List | Added: • Any • BigInt | |
Variables | Added built-in variables: • this • lastBlock • nil • Rounding methods: CEILING, DOWN, FLOOR etc. • Designations of hashing algorithms: NOALG, MD5, SHA1 etc. | Added strict variables | |
Structures | Added: Script actions: • DataEntry • ScriptTransfer Script results: • ScriptResult • TransferSet • WriteSet Common structures: • Asset • AttachedPayment • BlockInfo • Invocation Transaction structures: • InvokeScriptTransaction | Added: Script actions: • BinaryEntry • BooleanEntry • IntegerEntry • StringEntry • DeleteEntry • Issue • Reissue • Burn • SponsorFee Common structures: • BalanceDetails Transaction structures: • UpdateAssetInfoTransaction Modified: Common structures: • Asset • BlockInfo • Invocation Transaction structures: • DataTransaction • InvokeScriptTransaction • IssueTransaction Deleted: • DataEntry • ScriptResult • TransferSet • WriteSet | Added: Script actions: • Lease • LeaseCancel Modified: Common structures: • Invocation |
Built-in functions | Added: Blockchain functions: • assetInfo • blockInfoByHeight • transferTransactionById Converting functions: • parseInt • parseIntValue • toInt • toUtf8String • toString(Address) Decoding functions: • fromBase16String Encoding fuctions: • toBase16String Math functions: • log • pow String functions: • indexOf • lastIndexOf • split Union functions: • value • valueOrErrorMessage Verification functions: • checkMerkleProof • rsaVerify Deleted: • transactionById | Added: Blockchain functions: • calculateAssetId Converting fuctions: • transferTransactionFromProto List functions: • containsElement • indexOf • lastIndexOf • min/max • removeByIndex Math functions: • median String functions: • contains • makeString Union functions: • valueOrElse Verification functions: • bn256groth16verify • createMerkleRoot • ecrecover • groth16verify Deleted: • checkMerkleProof • extract | Added: dApp-to-dApp invocation function: • invoke • reentrantInvoke Account data storage functions: • getBinary(key: String): ByteVector|Unit • getBinaryValue(key: String): ByteVector • getBoolean(key: String): Boolean|Unit • getBooleanValue(key: String): Boolean • getInteger(key: String): Int|Unit • getIntegerValue(key: String): Int • getString(key: String): String|Unit • getStringValue(key: String): String • isDataStorageUntouched Blockchain functions: • calculateLeaseId • scriptHash Converting functions: • parseBigInt • parseBigIntValue • toBigInt(ByteVector): BigInt • toBigInt(ByteVector, Int, Int): BigInt • toBigInt(Int): BigInt • toBytes(BigInt): ByteVector • toInt(BigInt): Int • toString(BigInt): String List functions: • max(List[BigInt]): Bigint • min(List[BigInt]): Bigint Math functions: • fraction(Int, Int, Int, Union): Int • fraction(BigInt, BigInt, BigInt): BigInt • fraction(BigInt, BigInt, BigInt, Union): BigInt • log(BigInt, Int, BigInt, Int, Int, Union): BigInt • median(List[BigInt]): Bigint • pow(BigInt, Int, BigInt, Int, Int, Union): BigInt |
Operators | Added: • :+ • ++ | ||
Complexity changes | • - operator: 9 → 1 • ! operator: 11 → 1 • != operator: 26 → 1 • throw: 2 → 1 • isDefined: 35 → 1 | • + operator: 10 → 2 for ByteVector values, 10 → 20 for strings • Functions: see complexity changes in the Built-in Functions article • Added blake2b256_<N>Kb , keccak256_<N>Kb , sha256_<N>Kb ,rsaVerify_<N>Kb , sigVerify_<N>Kb range of similarfunctions with different complexity depending on the argument size limit | • fraction(Int, Int, Int): Int: 1 → 14 |
Data size | • String : up to 32,767 bytes• ByteVector : up to 32,767 (except the bodyBytes fieldof the transaction structure) | ||
Applying attached payments to the invoked dApp balance | After the script execution | After the script execution | Before the script execution |