Hello Solidity
Starting Solidity

Search for a command to run...

Series
This series will introduce the basics of the Solidity language
Starting Solidity

Getter functions can be declared view or pure. View function declares that no state will be changed. Pure function declares that no state variable will be changed or read. // SPDX-License-Identifier: MIT pragma solidity ^0.7.3; contract ViewAndPure ...

Solidity supports multiple inheritance. Contracts can inherit other contract by using the is keyword. Function that is going to be overridden by a child contract must be declared as virtual. Function that is going to override a parent function must u...

Events allow logging to the Ethereum blockchain. Some use cases for events are: Listening for events and updating user interface A cheap form of storage // SPDX-License-Identifier: MIT pragma solidity ^0.7.3; contract Event { // Event declar...

A constructor is an optional function that is executed upon contract creation. Here are examples of how to pass arguments to constructors. // SPDX-License-Identifier: MIT pragma solidity ^0.7.3; // Base contract X contract X { string public name...
Here we introduce you to some primitive data types available in Solidity. boolean The possible values are constants true and false uintint / uint: Signed and unsigned integers of various sizes. Keywords uint8 to uint256 in steps of 8 (unsigned of 8...