This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In this example multiple accounts can deposit their funds and safely take them back. | |
# User balances are stored in the dApp state as mapping `address => waves`. | |
{-# STDLIB_VERSION 4 #-} | |
{-# CONTENT_TYPE DAPP #-} | |
{-# SCRIPT_TYPE ACCOUNT #-} | |
@Callable(i) | |
func deposit() = { | |
# deposit function can be invoked from UI by user to top up the balance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Language | Pros | Cons | |
---|---|---|---|
Solidity | Blockchain-specific | Many ways “to shoot himself in the leg” | |
Turing-complete (flexibility) | Difficult to write production-ready code | ||
Good developer tools and libraries |