argotorg/solidity
GitHub: argotorg/solidity
Solidity 是一种用于以太坊平台编写智能合约的静态类型编程语言,解决了在链上安全可靠执行去中心化逻辑的编程问题。
Stars: 25606 | Forks: 6098
# Solidity 面向合约的编程语言
[](https://matrix.to/#/#ethereum_solidity:gitter.im)
[](https://gitter.im/ethereum/solidity)
[](https://forum.soliditylang.org/)
[](https://X.com/solidity_lang)
[](https://fosstodon.org/@solidity)
你可以在 Gitter 和 Matrix 上与我们交谈,在 X(之前称为 Twitter)上关注我们,或者在 Solidity 论坛中创建新话题。欢迎提问、反馈和建议!
Solidity 是一种用于在以太坊平台上实现智能合约的静态类型、面向合约的高级语言。
要了解概述和入门,请查看官方 [Solidity 语言门户](https://soliditylang.org)。
## 目录
- [背景](#background)
- [构建与安装](#build-and-install)
- [示例](#example)
- [文档](#documentation)
- [开发](#development)
- [维护者](#maintainers)
- [许可证](#license)
- [安全性](#security)
## 背景
Solidity 是一种静态类型的花括号编程语言,用于开发智能合约,
这些合约在以太坊虚拟机中运行。智能合约是在对等网络中执行的程序,
没有人对执行拥有特殊权限,因此它们允许任何人实现价值代币、
所有权、投票和其他类型的逻辑。
在部署合约时,你应该使用最新发布的 Solidity 版本。
这是因为破坏性变更以及新功能和错误修复会
定期引入。我们目前使用 0.x 版本
[以指示这种快速变化的速度](https://semver.org/#spec-item-4)。
## 构建与安装
有关如何构建和安装 Solidity 编译器的说明可以在
[Solidity 文档](https://docs.soliditylang.org/en/latest/installing-solidity.html#building-from-source) 中找到。
## 示例
Solidity 中的“Hello World”程序在其他语言中用处不大,但仍然:
```
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
contract HelloWorld {
function helloWorld() external pure returns (string memory) {
return "Hello, World!";
}
}
```
要开始使用 Solidity,你可以使用 [Remix](https://remix.ethereum.org/),它是一个
基于浏览器的集成开发环境。以下是一些示例合约:
1. [投票](https://docs.soliditylang.org/en/latest/solidity-by-example.html#voting)
2. [盲拍](https://docs.soliditylang.org/en/latest/solidity-by-example.html#blind-auction)
3. [安全远程购买](https://docs.soliditylang.org/en/latest/solidity-by-example.html#safe-remote-purchase)
4. [微支付通道](https://docs.soliditylang.org/en/latest/solidity-by-example.html#micropayment-channel)
## 文档
Solidity 文档托管在 [Read the Docs](https://docs.soliditylang.org)。
## 开发
Solidity 仍在开发中。欢迎贡献!
请遵循
[开发者指南](https://docs.soliditylang.org/en/latest/contributing.html)
如果你想提供帮助。
你可以在 [项目部分](https://github.com/argotorg/solidity/projects) 中查看我们即将发布的版本的功能和错误修复优先级。
## 维护者
Solidity 编程语言和编译器是受核心团队指导的开源社区项目。
核心团队由 [以太坊基金会](https://ethereum.foundation/) 赞助。
## 许可证
Solidity 根据 [GNU 通用公共许可证 v3.0](LICENSE.txt) 授权。
一些第三方代码有其[自己的许可条款](cmake/templates/license.h.in)。
## 安全性
安全策略可以在[此处](SECURITY.md)找到。
标签:DApp, Ethereum, High-Level Language, Peer-to-Peer, Smart Contract, Solidity, Statically Typed, Token, XML 请求, 以太坊, 分布式系统, 区块链, 区块链开发, 去中心化, 合约安全, 合约导向, 响应大小分析, 安全开发, 所有权, 投票, 数据可视化, 智能合约, 服务器监控, 编程语言, 逆向工具, 静态类型