In This Release
RIDE 4 DApps
In this release, we introduce RIDE4DApps
: the RIDE language and blockchain update. This grants a way to assign programmable functions to an account, which operate state and tokens atomically. To initiate the call, use the new InvokeScriptTransaction
. More on that in the documentation.
RIDE Language Update
- Defining custom functions:
func max(a: Int, b: Int) = if (a > b) then a else b
@Callable(inv)
and@Verifier(tx)
annotations:
@Callable(i)
func record(x: Int) = {
WriteSet([DataEntry(toBase58String(i.caller.bytes), x])
}
@Verifier(tx)
func verify() = {
false
}
-
Postfix notation for function calls:
extract(i.payment)
can be rewritten asi.payment.extract()
getInteger(account, key)
can be simplified toaccount.getInteger(key)
-
Compiler now supports directives. These are recommended to be specified at the beginning of DAPP code:
{-# STDLIB_VERSION 3 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}
# definitions, callable and verifier functions go here
Default values are:
{-# STDLIB_VERSION 2 #-}
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ACCOUNT #-}
For Asset script, use
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ASSET #-}
Standard library version 3 and content-type DAPP
will be available after successful RIDE4DAPPS
feature activation.
{-# STDLIB_VERSION 3 #-}
includes:
this
, returning address of the account, granting
getInteger(this, key)
value()
function, which is the same asextract
let x = [a,b,c]
List constructor- New types:
WriteSet
,TransferSet
,ScriptResult
and other types necessary for script invocation getInteger(...)
family of functions andaddressFromString
now have companions of typegetIntegerValue(..)
andaddressFromStringValue(..)
which throw unrecoverable exception is the value is not present
Other changes
- Default directory now follows os-specific guidelines:
OSX:$HOME/Library/Application Support/waves
Linux:$XDG_DATA_HOME/waves
or$HOME/.local/share/waves
Windows:%APPDATA%/local/waves
(edited)
RIDE 4 DAPPS is implemented as Feature 11. Please vote!
Update Notes
No need to rebuild the node storage when updating from version 0.16.2
SHA256 Checksums
d53d59cb92b0e3d8fbeaba481e778cd254919284f5c5d80ee2133868c3fdefbd waves-all-0.17.0.jar
a8d205f6018a32eca91998b44b542013ef7e22a4919ffb489ae9eb48d9226a0d waves-testnet_0.17.0_all.deb