- Smart Accounts
- Smart Assets
- RIDE Language
- RIDE Language Description
- Effective RIDE Examples
- RIDE Maven Compiler Package
- Syntax Processor and Executor Implementation Details
- Functions and Standard Library
- Creating and Deploying a Script Manually
- Script Performance Tests
- Waves Console Commands
- Video Tutorials and Articles
Smart contracts will bring new benefits to the Waves ecosystem:
- Smart accounts will allow for multisignature wallets, which cannot be controlled by one user only. This will be useful for token sales, since funds can be held safely during deployment.
- Smart assets will allow for a script to be attached to the asset. Transactions for such assets are valid only if the script returns True.
- Waves smart contracts do not use gas for non-Turing complete smart contracts which means that fixed costs are always known upfront.
- Decentralized applications (DApps) which are based on Turing-complete smart contracts will be able to complete complicated processes on the Waves blockchain, meeting a wide range of different criteria.
We see the syntax of our language as functional, similar to F#: strong and statically typed.
Note. Here you can find our White Paper which describes Waves Smart Contracts.
Our realisation of smart contracts will contain two Stages:
Non-Turing Complete Smart Contracts which cover a large proportion of use cases, including smart accounts.
Turing Complete Smart Contracts which will allow the creation of decentralised applications on the blockchain.
A Smart Account language implementation, It is an important property that the smart account does not store any data on the blockchain. A smart account will only have access to blockchain state values that can be retrieved and executed relatively fast, in a “constant” time.
The main idea that Before the transaction is submitted to be included in the next block, the account checks if the transaction meets certain requirements, defined in a script. The script is attached to the account so the account can validate every transaction before confirming it.
3.1 The Main Requirement for Smart Accounts
The smart accounts can be run for the price of normal transactions with a predefined fee, without any additional “gas” or other costs.
3.2 Smart Accounts Restrictions
Smart accounts cannot send transactions themselves or transfer funds according to given conditions, but can read data from the blockchain (for example, the height of a block or signatures from the transaction) and return the result of a predicate obtained on the basis of this data.
If we plan to apply constraints on all operations for a specific asset, we cannot use a smart account. In our paradigm, we have smart assets for this purpose: the script will be attached to the asset and will work in a similar way. Transactions for such assets are valid only if the script returns True. For example, a script can verify proofs from a transaction, check if a notary/escrow approves the transaction, and that operations with the asset are not locked for a specified time. The script for the token is invoked upon the following operations with an asset:
- Transfer Transaction
- MassTransfer Transaction
- Reissue Transaction
- Burn Transaction