Paradigm | Imperative |
---|---|
Designed by | Gavin Wood |
Developer | Christian Reitwiessner, [1] Alex Beregszaszi, [2] and several former Ethereum core contributors. |
First appeared | August 2014 |
Stable release | 0.8.25 [3] / 14 March 2024 |
Implementation language | C++ [4] |
License | GNU General Public License v3.0 [5] |
Filename extensions | .sol |
Website | soliditylang |
Influenced by | |
JavaScript, C++, Python |
Solidity is a programming language for implementing smart contracts [6] [7] on various blockchain platforms, most notably, Ethereum. [8] Solidity is licensed under GNU General Public License v3.0. [9] Solidity was designed by Gavin Wood [10] [ non-primary source needed ] and developed by Christian Reitwiessner, Alex Beregszaszi, and several former Ethereum core contributors. [11] Programs in Solidity run on Ethereum Virtual Machine or on compatible virtual machines.
Solidity was proposed in August 2014 by Gavin Wood [12] [ non-primary source needed ] The language was later developed by the Ethereum project's Solidity team, led by Christian Reitwiessner.
Solidity is the primary language used to develop smart contracts for Ethereum as well as other private blockchains, such as the enterprise-oriented Hyperledger Fabric blockchain. SWIFT deployed a proof of concept using Solidity running on Hyperledger Fabric. [13] [14]
Solidity is a statically typed programming language designed for developing smart contracts that run on the Ethereum Virtual Machine (EVM) or compatible virtual machines. [15]
Solidity uses ECMAScript-like syntax which makes it familiar for existing web developers; [16] however unlike ECMAScript it has static typing and variadic return types. Solidity is different from other EVM-targeting languages such as Serpent and Mutan in some important ways. It supports complex member variables for smart contracts, including arbitrarily hierarchical mappings and structs. Solidity smart contract support inheritance, including multiple inheritance with C3 linearization. Solidity introduces an application binary interface (ABI) that facilitates multiple type-safe functions within a single smart contract (this was also later supported by Serpent). The Solidity proposal also includes "Natural Language Specification", a documentation system for specifying user-centric descriptions of the ramifications of method-calls. [17] [18] [ non-primary source needed ]
Example of a Solidity program: [19] [20]
// SPDX-License-Identifier: GPL-3.0pragma solidity^0.8.4;contractCoin{// The keyword "public" makes variables// accessible from other contractsaddresspublic minter;mapping(address=>uint)publicbalances;// Events allow clients to react to specific// contract changes you declareeventSent(addressfrom,addressto,uintamount);// Constructor code is only run when the contract// is createdconstructor(){minter=msg.sender;}// Sends an amount of newly created coins to an address// Can only be called by the contract creatorfunctionmint(addressreceiver,uintamount)public{require(msg.sender==minter);balances[receiver]+=amount;}// Errors allow you to provide information about// why an operation failed. They are returned// to the caller of the function.errorInsufficientBalance(uintrequested,uintavailable);// Sends an amount of existing coins// from any caller to an addressfunctionsend(addressreceiver,uintamount)public{if(amount>balances[msg.sender])revertInsufficientBalance({requested:amount,available:balances[msg.sender]});balances[msg.sender]-=amount;balances[receiver]+=amount;emitSent(msg.sender,receiver,amount);}}
Solidity is available on:
Many security properties of smart contracts are inherently difficult to reason about directly, and the Turing-completeness of Solidity means that verification of arbitrary properties cannot be decidably automated. Current automated solutions for smart contract security analysis can miss critical violations, produce false positives, and fail to achieve sufficient code coverage on realistic contracts. [28] Solidity has been blamed for the error-prone implementation of Ethereum smart contracts due to its counterintuitive nature, its lack of constructs to deal with blockchain domain-specific aspects, and its lack of centralized documentation of known vulnerabilities. [29]
In 2016, a Cornell University researcher stated that Solidity was partially to blame for The DAO hack that took place that year. 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." [30]
The developers community often cites Solidity requiring much of third party interfaces and APIs, and its inability to create critical information intensive smart contracts.
A smart contract is a computer program or a transaction protocol that is intended to automatically execute, control or document events and actions according to the terms of a contract or an agreement. The objectives of smart contracts are the reduction of need for trusted intermediators, arbitration costs, and fraud losses, as well as the reduction of malicious and accidental exceptions. Smart contracts are commonly associated with cryptocurrencies, and the smart contracts introduced by Ethereum are generally considered a fundamental building block for decentralized finance (DeFi) and NFT applications.
JEB is a disassembler and decompiler software for Android applications and native machine code. It decompiles Dalvik bytecode to Java source code, and x86, ARM, MIPS, RISC-V machine code to C source code. The assembly and source outputs are interactive and can be refactored. Users can also write their own scripts and plugins to extend JEB functionality.
Ethereum is a decentralized blockchain with smart contract functionality. Ether is the native cryptocurrency of the platform. Among cryptocurrencies, ether is second only to bitcoin in market capitalization. It is open-source software.
Counterparty is a peer-to-peer financial platform and distributed, open source Internet protocol built on top of the Bitcoin blockchain and network. It was one of the most well-known "Bitcoin 2.0" platforms in 2014, along with Mastercoin, Ethereum, Colored Coins, Ripple and BitShares.
A blockchain is a distributed ledger with growing lists of records (blocks) that are securely linked together via cryptographic hashes. Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data. Since each block contains information about the previous block, they effectively form a chain, with each additional block linking to the ones before it. Consequently, blockchain transactions are irreversible in that, once they are recorded, the data in any given block cannot be altered retroactively without altering all subsequent blocks.
Hyperledger is an umbrella project of open source blockchains and related tools that the Linux Foundation started in December 2015. IBM, Intel, and SAP Ariba have contributed to support the collaborative development of blockchain-based distributed ledgers. It was renamed the Hyperledger Foundation in October 2021.
Joseph Lubin is a Canadian-American businessman. He has founded and co-founded several companies, including the Swiss-based EthSuisse, contributing heavily to Ethereum, the decentralized cryptocurrency platform. Lubin is the founder of ConsenSys, a Brooklyn-based software production studio.
The DAO was a digital decentralized autonomous organization and a form of investor-directed venture capital fund. After launching in April 2016 via a token sale, it became one of the largest crowdfunding campaigns in history, but it ceased activity after much of its funds were taken in a hack in June 2016.
A decentralised application is an application that can operate autonomously, typically through the use of smart contracts, that run on a decentralized computing, blockchain or other distributed ledger system. Like traditional applications, DApps provide some function or utility to its users. However, unlike traditional applications, DApps operate without human intervention and are not owned by any one entity, rather DApps distribute tokens that represent ownership. These tokens are distributed according to a programmed algorithm to the users of the system, diluting ownership and control of the DApp. Without any one entity controlling the system, the application is therefore decentralised.
Ethereum Classic is a blockchain-based distributed computing platform that offers smart contract (scripting) functionality. It is open source and supports a modified version of Nakamoto consensus via transaction-based state transitions executed on a public Ethereum Virtual Machine (EVM).
Firo, formerly known as Zcoin, is a cryptocurrency aimed at using cryptography to provide better privacy for its users compared to other cryptocurrencies such as Bitcoin.
Cardano is a public blockchain platform. It is open-source and decentralized, with consensus achieved using proof of stake. It can facilitate peer-to-peer transactions with its internal cryptocurrency, ADA.
Gavin James Wood is an English computer scientist, a co-founder of Ethereum and creator of Polkadot and Kusama.
CryptoKitties is a blockchain game developed by Canadian studio Dapper Labs. The game allows players to buy, sell, and create non-fungible tokens (NFTs) using on Ethereum. These NFTs represent virtual cats. The game's popularity in December 2017, congested the Ethereum network, causing it to reach an all-time high in the number of transactions and slowing it down significantly.
A blockchain is a shared database that records transactions between two parties in an immutable ledger. Blockchain documents and confirms pseudonymous ownership of all transactions in a verifiable and sustainable way. After a transaction is validated and cryptographically verified by other participants or nodes in the network, it is made into a "block" on the blockchain. A block contains information about the time the transaction occurred, previous transactions, and details about the transaction. Once recorded as a block, transactions are ordered chronologically and cannot be altered. This technology rose to popularity after the creation of Bitcoin, the first application of blockchain technology, which has since catalyzed other cryptocurrencies and applications.
Decentralized finance offers financial instruments without relying on intermediaries such as brokerages, exchanges, or banks by using smart contracts on a blockchain, mainly Ethereum. DeFi platforms allow people to lend or borrow funds from others, speculate on price movements on assets using derivatives, trade cryptocurrencies, insure against risks, and earn interest in savings-like accounts. DeFi uses a layered architecture and highly composable building blocks. Some applications promote high-interest rates but are subject to high risk. Coding errors and hacks have been common in DeFi.
In blockchain technology, a testnet is an instance of a blockchain powered by the same or a newer version of the underlying software, to be used for testing and experimentation without risk to real funds or the main chain. Testnet coins are separate and distinct from the official (mainnet) coins, don't have value, and can be obtained freely from faucets.
Tornado Cash is an open source, non-custodial, fully decentralized cryptocurrency tumbler that runs on Ethereum Virtual Machine-compatible networks. It offers a service that mixes potentially identifiable or "tainted" cryptocurrency funds with others, so as to obscure the trail back to the fund's original source. This is a privacy tool used in EVM networks where all transactions are public by default.
Nervos Network is a blockchain platform which consists of multiple blockchain layers that are designed for different functions. The foundational layer is known as the Common Knowledge Base, whilst the native cryptocurrency of this layer is called CKB. This foundational layer uses a proof-of-work consensus model. Smart contracts and decentralized applications can be deployed on any layer.
The ERC-721 Non-fungible Token Standard, is a technical framework, defining a set of rules and interfaces for creating and managing unique, non-fungible tokens (NFTs) on the Ethereum blockchain. ERC-721 is recognized for formalizing the concept of an NFT and establishing the foundation of the multi-billion dollar digital collectibles eco-system that emerged alongside its adoption. It is one of the most widely used NFT standards across use cases and has been utilized in various high profile projects.
{{cite web}}
: Check |archive-url=
value (help)CS1 maint: url-status (link)Different source languages compile to the EVM semantics, the predominant of them being Solidity
{{cite journal}}
: CS1 maint: numeric names: authors list (link){{cite book}}
: CS1 maint: location missing publisher (link)