Solidity – Functions

Solidity – Functions

Function Modifiers Modifiers can be used to easily change the behaviour of functions. For example, they can automatically check a condition prior to executing the function. Modifiers are inheritable properties of contracts and may be overridden by derived contracts....
Solidity tutorial – Contracts

Solidity tutorial – Contracts

Contracts Contracts in Solidity are similar to classes in object-oriented languages. They contain persistent data in state variables and functions that can modify these variables. Calling a function on a different contract (instance) will perform an EVM function call...
Solidity tutorial – 6

Solidity tutorial – 6

Expressions and Control Structures Control Structures Most of the control structures known from curly-braces languages are available in Solidity: There is: if, else, while, do, for, break, continue, return, with the usual semantics known from C or JavaScript....
Solidity tutorial – 5

Solidity tutorial – 5

Units and Globally Available Variables Ether Units A literal number can take a suffix of wei, finney, szabo or ether to specify a subdenomination of Ether, where Ether numbers without a postfix are assumed to be Wei. assert(1 wei == 1); assert(1 szabo == 1e12);...
Solidity tutorial – 4

Solidity tutorial – 4

Reference Types Values of reference type can be modified through multiple different names. Contrast this with value types where you get an independent copy whenever a variable of value type is used. Because of that, reference types have to be handled more carefully...
WhatsApp chat