Fuel手册-更新中 (The Fuel Book)-updating
  • 0.Fuel手册 (The Fuel Book)
  • 1. 开发者快速上手 (Developer Quickstart)
    • 1.1构建智能合约 (Building A Smart Contract)
    • 1.2 构建前端 (Building a Frontend)
  • 2.准备开始 (Getting Started)
    • 2.1为什么是Fuel (Why Fuel)
    • 2.2Fuel是什么? (What is Fuel?)
      • 2.2.1 Fuel工具链 (The Fuel Toolchain)
    • 2.3 模块化运动 (Modular Movement)
      • 2.3.1 单片架构 (Monolithic Architecture)
      • 2.3.4 什么是模块化执行层 (What is a Modular Execution Layer)
    • 2.4 Fuel设置 (Fuel Configurations)
      • 2.4.1 作为汇总的Fuel (Fuel as a roll-up)
      • 2.4.2 作为L1的Fuel (Fuel as an L1)
      • 2.4.3 作为状态通道的Fuel (Fuel as a state channel)
      • 2.4.4 作为侧链的Fuel (Fuel as a sidechain)
  • 3. 技术 (Technology)
    • 3.1 并行交易执行(Parallel Transaction Execution)
    • 3.2欺诈证明 (Fraud Proofs)
  • 4. Fuel虚拟机 (The FuelVM)
    • 4.1合约和调用模型(Contract and Call Model)
    • 4.2内存模式 (Memory Mode)
    • 4.3多重原生资产(Multiple Native Assets)
    • 4.4FuelVM和EVM, 轻松搞明白(FuelVM vs. EVM, Explained)
  • 5.Sway语言 (Sway Language)
    • 5.1 Sway设计哲学 (Sway Design Philosophy)
    • 5.2 Sway的安全性 (Sway Safety)
  • 6.开发者看这里(For Developers)
    • 6.1Sway程序示例 (Sway Application Examples)
    • 6.2 网络 (Networks)
      • 6.2.1 `beta-3`测试网 (The `beta-3` testnet)
      • 6.2.2 `beta-2`测试网 (The `beta-2` testnet)
      • 6.2.3 `beta-1` 测试网 (beta-1 testnet)
    • 6.3 运行一个本地Fuel节点 (Running a local Fuel node)
    • 6.4 Sway语言 (Sway Language) 🌴
    • 6.5 Typescript SDK
    • 6.6 Rust SDK
    • 6.7 Fuel索引器 (Fuel Indexer)
    • 6.8 水龙头和区块浏览器 (Faucet and Block Explorer)
    • 6.9 Fuelup
    • 6.10 Fuel GraphQL API
  • 7. Fuel术语 (Fuel Glossary)
Powered by GitBook
On this page
  1. 6.开发者看这里(For Developers)

6.1Sway程序示例 (Sway Application Examples)

Previous6.开发者看这里(For Developers)Next6.2 网络 (Networks)

Last updated 2 years ago

Developers are encouraged to reference the sway-applications repo for examples for common patterns and functionality. contains smart contracts that are written in Sway in order to demonstrate what can be built, and offer forkable code for others to build on.

鼓励开发人员参考 sway-applications 存储库,进而获取常见模式和功能的示例。 包含用 Sway 编写的智能合约,进而演示可以构建的内容,并提供可分叉的代码供他人构建。

We have the following contracts available as a reference: 我们有以下可供参考的合约:

  • Airdrop is a token distribution program where users are able to claim tokens given a valid merkle proof. Airdrop(空投) 是一种代币分发程序,用户可以在提供有效的 merkle(默克尔) 证明的情况下领取代币。

  • Automated Market Maker (AMM) is a decentralized exchange protocol that manages liquidity pools supplied by its users and determines prices algorithmically while exchanging assets. 自动做市商 (AMM) 是一种去中心化交易协议,可管理其用户提供的流动资金池,并在交易资产时通过算法确定价格。

  • Decentralized Autonomous Organization (DAO) is an organization where users get to vote on governance proposals using governance tokens. 去中心化自治组织 (DAO) 是一个用户可以使用治理代币对治理提案进行投票的组织。

  • English Auction is an auction where users bid up the price of an asset until the bidding period has ended or a reserve has been met. English Auction(英式拍卖) 是一种拍卖,用户对资产的价格进行竞价,直到竞价期结束或达到保留价为止。

  • Escrow is a third party that keeps an asset on behalf of multiple parties. Fundraiser is a program allowing users to pledge towards a goal. 托管是代表多个主体保管资产的第三方。筹款活动是一个允许用户承诺实现目标的程序。

  • Multi-Signature Wallet is a wallet that requires multiple signatures to execute a transaction. 多重签名钱包是一种需要多重签名才能执行交易的钱包。

  • Name-Registry allows users to perform transactions with human readable names instead of addresses. Name-Registry(名称注册) 允许用户使用人类可读的名称而不是地址来执行交易

  • Non-Fungible Token (NFT) is a token contract which provides unique collectibles, identified and differentiated by token IDs, where tokens contain metadata giving them distinctive characteristics. Non-Fungible Token (NFT) 是一种代币合约,它提供独特的收藏品,由代币 ID 识别和区分,其中代币包含赋予其独特特征的元数据

  • Oracle is a smart contract that provides off-chain data to on-chain applications. OTC Swap Predicate is a predicate that can be used to propose and execute an atomic swap between two parties without requiring any on-chain state. Oracle(预言机) 是一种智能合约,可为链上应用提供链下数据。 OTC 交换谓词是一种谓词,可用于在不需要任何链上状态的情况下提出和执行两方之间的原子交换

View all of the applications . 查看所有应用。

Please note all projects currently use forc 0.31.1, and fuel-core 0.14.1. 请注意目前所有项目都使用 forc 0.31.1 和 fuel-core 0.14.1。

This repository
该存储库
here
点击此处