$ whois solidity
Solidity
first released in 2014 · by Gavin Wood, Christian Reitwiessner
$ guessprog --inspect solidity
- year
- 2014
- paradigm
- object oriented
- family
- c like
- memory
- none
- binding
- static
- safety
- strong
SOLIDITY(7)
- AUTHORS
- Gavin Wood, Christian Reitwiessner
- HISTORY
- Solidity was proposed by Gavin Wood in 2014, while he was working on Ethereum, as a language for writing smart contracts: programs stored on the blockchain that hold and move funds according to their code. Its development was then led by Christian Reitwiessner and the Ethereum Solidity team. The syntax deliberately borrows from JavaScript, C++ and Python to feel familiar to developers, while compiling to bytecode for the Ethereum Virtual Machine. Because deployed contracts are hard to change, bugs can be very costly, as the 2016 DAO hack famously showed.
- USAGE
- The dominant language for smart contracts on Ethereum and the many other blockchains compatible with the Ethereum Virtual Machine. Its use is tied almost entirely to the cryptocurrency and decentralised finance ecosystem.
- SEE ALSO
- Solidity on Wikipedia ↗
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract TipJar {
address public immutable owner = msg.sender;
mapping(address => uint256) public tipped;
function tip() external payable {
require(msg.value > 0, "No ether sent");
tipped[msg.sender] += msg.value;
}
function withdraw() external {
require(msg.sender == owner, "Not the owner");
payable(owner).transfer(address(this).balance);
}
}