Solidity source:

Solidity logo.svg
The Solidity language logo
Influenced by
JavaScript, C++, Python, PowerShell

Solidity is an object-oriented programming language for writing smart contracts.[1][2] It is used for implementing smart contracts[3] on various blockchain platforms, most notably, Ethereum.[citation needed] It was developed by Christian Reitwiessner, Alex Beregszaszi, and several former Ethereum core contributors to enable writing smart contracts on blockchain platforms such as Ethereum.[4]


Solidity was initially proposed in August 2014 by Gavin Wood;[5][non-primary source needed][6][irrelevant citation] the language was later developed by the Ethereum project's Solidity team, led by Christian Reitwiessner.

At present, Solidity is the primary language on Ethereum as well as on other private blockchains running on platforms that compete with Ethereum, such as Monax and its Hyperledger Burrow blockchain, which uses Tendermint for consensus. SWIFT has deployed a proof of concept using Solidity running on Burrow.[3][non-primary source needed][7][unreliable source]

A Cornell University researcher stated that Solidity was partially to blame for The DAO hack that took place in 2016. He stated: "this was actually not a flaw or exploit in the DAO contract itself: technically the Ethereum Virtual Machine (EVM) was operating as intended, but Solidity was introducing security flaws into contracts that were not only missed by the community, but missed by the designers of the language themselves."[8]


Solidity is a statically-typed programming language designed for developing smart contracts that run on the EVM.[9][10] Solidity is compiled to bytecode that is executable on the EVM. With Solidity, developers are able to write applications that implement self-enforcing business logic embodied in smart contracts, leaving a non-repudiable and authoritative record of transactions.[11] Writing smart contracts in smart contract specific languages such as Solidity is claimed to be easy (ostensibly for those who already have programming skills).[12]

As specified by Wood it is designed around the ECMAScript syntax to make it familiar for existing web developers;[citation needed] unlike ECMAScript it has static typing and variadic return types. Compared to other EVM-targeting languages of the time such as Serpent and Mutan, Solidity contained a number of important differences. Complex member variables for contracts including arbitrarily hierarchical mappings and structs were supported. Contracts support inheritance, including multiple inheritance with C3 linearization. An application binary interface (ABI) facilitating multiple type-safe functions within a single contract was also introduced (and later supported by Serpent). A documentation system for specifying a user-centric description of the ramifications of a method-call was also included in the proposal, known as "Natural Language Specification".[13][14][non-primary source needed]

Example of a Solidity program:[15][16]

pragma solidity >=0.5.0 <0.7.0;

contract Coin {
    // The keyword "public" makes variables
    // accessible from other contracts
    address public minter;
    mapping (address => uint) public balances;

    // Events allow clients to react to specific
    // contract changes you declare
    event Sent (address from, address to, uint amount);

    // Constructor code is only run when the contract
    // is created
    constructor() public {
        minter = msg.sender;

    // Sends an amount of newly created coins to an address
    // Can only be called by the contract creator
    function mint(address receiver, uint amount) public {
        require(msg.sender == minter);
        require(amount < 1e60);
        balances[receiver] += amount;

    // Sends an amount of existing coins
    // from any caller to an address
    function send(address receiver, uint amount) public {
        require(amount <= balances[msg.sender], "Insufficient balance.");
        balances[msg.sender] -= amount;
        balances[receiver] += amount;
        emit Sent (msg.sender, receiver, amount);

Development platform availability[edit]

Blockchain platforms[edit]

Solidity is available on:


  1. ^ Allison, Ian (12 August 2016). "PwC blockchain expert pinpoints sources of ambiguity in smart contracts". IBTimes (News). Retrieved 14 December 2016.
  2. ^ Afshar, Vala; Evangelist, ContributorChief Digital; Salesforce (17 July 2017). "Ethereum Is The Second Most Valuable Digital Currency, Behind Bitcoin". HuffPost. Retrieved 10 April 2019.
  3. ^ a b "SOFE Berlin: Swift unveils blockchain proof-of-concept". Finextra (News). 24 November 2016. Retrieved 24 November 2016.
  4. ^ "List of contributors".
  5. ^ Benoit Schweblin. "StackEdit Viewer".
  6. ^ "Blockchain and big data worth watching in the coming year". Business. International Business Times. 20 December 2016. Retrieved 28 September 2017.
  7. ^ KENTOURIS, CHRIS (13 December 2016). "Blockchain's Smart Contracts: What's Smart, What's Not". Finops (News). Retrieved 14 December 2016.
  8. ^ Finley, Klint (18 June 2016). "A $50 MILLION HACK JUST SHOWED THAT THE DAO WAS ALL TOO HUMAN". Wired (News). Retrieved 18 February 2017.
  9. ^ "Hyperledger Fabric Tutorial - Create a blockchain app for loyalty points". IBM Developer. Retrieved 10 April 2019.
  10. ^ a b Allison, Ian (30 March 2016). "Microsoft adds Ethereum language Solidity to Visual Studio". International Business Times. Retrieved 11 May 2016.
  11. ^ Allison, Ian (30 March 2016). "Microsoft adds Ethereum language Solidity to Visual Studio". International Business Times. Retrieved 11 May 2016.
  12. ^ Mougayar, William (26 April 2016). The Business Blockchain: Promise, Practice, and Application of the Next Internet Technology. Wiley Publishing. p. 58. ISBN 978-1119300311.
  13. ^ Kapetanios-2008-06-27, p. 309.
  14. ^ ethereum. "Ethereum Natural Specification Format". GitHub.
  15. ^ "Subcurrency Example from the Solidity documentation".
  16. ^ Schneier, Karthikeyan; Schneier, Antoine; Bhargavan, Cedric; Delignat-Lavaud, Anitha; Fournet, Gollamudi; Schneier, Bruce; Rastogi, Nadim; Sibut-Pinote, Aseem; Rastogi1, Thomas; Swamy, Nikhil; Zanella-Beguelin, Santiago (27 August 2016). "Short Paper: Formal Verification of Smart Contracts" (PDF). Microsoft Research, French Institute for Research in Computer Science and Automation, Harvard University. Archived (PDF) from the original on 27 August 2016.
  17. ^ PatAltimore. "Use Visual Studio Code to connect to Azure Blockchain Service - Azure Blockchain". Retrieved 27 March 2020.