-
Notifications
You must be signed in to change notification settings - Fork 9
Vyper language features
Denis Bogdanas edited this page Apr 9, 2018
·
5 revisions
Here we briefly enumerate the features of Vyper language.
Contract members:
- functions
- global variables
- events
- contract interfaces
Types:
int128uint256decimalbytes32addressbool- unit types
-
bytes[n]- variable-size byte arrays liststruct- tuple
- map
Statements:
- variable declaration:
a: int128ora: int128 = e - assignment:
a = e - augmented assignment:
a += e - if
- for in range:
for i in in range(rounds)orfor i in in range(start, end) - for in list: `for elem in [1, 2, 3]'
breakcontinuereturnassertthrow-
log- event logging -
del- deleting elements from a map - function calls
- external contract calls
Binary operators: + - * / % **
Unary operators: ! -
Boolean operators: and or
Comparison operators: < <= > >= == != in
Reserved expressions:
balancecodesizeis_contractmsg.sendermsg.valuemsg.gasblock.difficultyblock.timestampblock.coinbaseblock.numberblock.prevhash
Functions:
floorceildecimalas_unitless_numberconvertslicelenconcatkeccak256method_id- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``