Files
solana/docs/i18n/zh/docusaurus-plugin-content-docs/current/developing/on-chain-programs/examples.md

49 lines
1.7 KiB
Markdown
Raw Normal View History

---
title: "示例"
---
## Hello World
Hello World是一个演示项目展示了如何使用Solana Javascript API以及Rust和C程序来构建、部署、与Solana区块链程序进行交互。
该项目包括:
- 链上的Hello World程序
- 向某个帐户发送 hello 并获取发送次数。
### 构建并运行
首先获取示例代码的最新版本:
```bash
$ git clone https://github.com/solana-labs/example-helloworld.git
$ cd example-helloworld
```
接下来按照git仓库[README](https://github.com/solana-labs/example-helloworld/blob/master/README.md)中的步骤进行操作。
## 中断
[Break](https://break.solana.com/)是一个React应用程序它使用户对Solana网络的速度和高性能有熟悉的感觉。 你能_干倒_Solana区块链吗 在15秒的游戏过程中每次单击按钮或击键都会向集群发送新的事务。 尽可能快地敲击键盘,并观看交易实时实时完成,而网络正在正常运行!
可以在我们的Devnet、Testnet和Mainnet Beta网络上来玩这个游戏。 在Devnet和Testnet可以免费测试用户可从网络水龙头获得空投测试代币。 在Mainnet Beta上用户每次玩耍需要支付0.08 SOL的费用。 可以通过本地密钥库钱包或通过扫描Trust Wallet的QR码以传输代币为测试帐户转入代币。
[点击这里玩这个游戏](https://break.solana.com/)
### 构建并运行
首先获取示例代码的最新版本:
```bash
$ git clone https://github.com/solana-labs/break.git
$ cd break
```
接下来按照git仓库的[README](https://github.com/solana-labs/break/blob/master/README.md)中的步骤进行操作。
## 特定语言
- [Rust](developing-rust.md#examples)
- [C](developing-c.md#examples)