Solidity

Solidity logo

Solidity is an object-oriented, high-level language for implementing smart contracts. Smart contracts are programs which govern the behaviour of accounts within the Ethereum state.

Solidity was influenced by C++, Python and JavaScript and is designed to target the Ethereum Virtual Machine (EVM).

Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features.

With Solidity you can create contracts for uses such as voting, crowdfunding, blind auctions, and multi-signature wallets.

When deploying contracts, you should use the latest released version of Solidity. This is because breaking changes as well as new features and bug fixes are introduced regularly. We currently use a 0.x version number [to indicate this fast pace of change](https://semver.org/#spec-item-4).

Language Documentation

If you are new to the concept of smart contracts we recommend you start with an example smart contract written in Solidity. When you are ready for more detail, we recommend you read the “Solidity by Example” and “Solidity in Depth” sections to learn the core concepts of the language.

For further reading, try the basics of blockchains and details of the Ethereum Virtual Machine.

Hint

You can always try out code examples in your browser with the Remix IDE. Remix is a web browser based IDE that allows you to write Solidity smart contracts, then deploy and run the smart contracts. It can take a while to load, so please be patient.

Warning

As humans write software, it can have bugs. You should follow established software development best-practices when writing your smart contracts, this includes code review, testing, audits, and correctness proofs. Smart contract users are sometimes more confident with code than their authors, and blockchains and smart contracts have their own unique issues to watch out for, so before working on production code, make sure you read the Security Considerations section.

If you have any questions, you can try searching for answers or asking on the Ethereum Stackexchange, or our gitter channel.

Ideas for improving Solidity or this documentation are always welcome, read our contributors guide for more details.

Translations

Community volunteers help translate this documentation into several languages. They have varying degrees of completeness and up-to-dateness. The English version stands as a reference.

Contents

Keyword Index, Search Page