百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

sway-applications

> 编程语言
开源

Sway应用

1.6K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Sway应用

## Overview The purpose of this repository is to contain end-to-end applications that are written in Sway in order to demonstrate what can be built. This means that a project will generally consist of a Sway contract and a user interface in order to interact with the contract however that is not a hard rule. > [!WARNING] > **Legacy, version-pinned examples:** These applications have not been updated for current Sway releases or Fuel network toolchains. Most pins were last updated in May 2024. Preserve them as historical examples, but do not treat their syntax, SDK usage, transaction construction, or security patterns as current guidance without revalidating them against your selected compiler, SDK, node, and network. ## Repository Structure Each project within this repository is independent of the other projects and thus every project has its own directory with all of the files required to make it work. That being said they are all under the same [CI](.github/workflows/ci.yml) so any updates to a project must make sure that the other projects continue to pass. The following is a visual sample of how the repository is structured. ``` sway-applications/ ├── Project-1 | └── P-1 Directories & files ├── Project-2 | └── P-2 Directories & files ├── LICENSE └── README.md ``` ### Projects #### Asset Management - [Airdrop](./airdrop/) is an asset distribution program where users are able to claim assets given a valid merkle proof. - [Escrow](./escrow) is a third party that keeps an asset on behalf of multiple parties. - [Non-Fungible Native Asset (NFT)](./NFT) is an asset contract which provides unique collectibles, identified and differentiated by IDs, where assets contain metadata giving them distinctive characteristics. - [Fractional Non-Fungible Token (F-NFT)](./fractional-NFT) is a token contract which issues shares or partial ownership upon locking an NFT into a vault. - [Timelock](./timelock) is a contract which restricts the execution of a transaction to a specified time range. - [Native Asset](./native-asset) is a basic asset contract that enables the use of Native Assets on Fuel using existing standards and libraries. #### Decentralized Finance - [English Auction](./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. - [Fundraiser](./fundraiser/) is a program allowing users to pledge towards a goal. - [OTC Swap Predicate](./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. #### Governance - [Decentralized Autonomous Organization (DAO)](./DAO) is an organization where users get to vote on governance proposals using governance assets. - [Multi-Signature Wallet](./multisig-wallet) is a wallet that requires multiple signatures to execute a transaction. #### Other - [Counter-Script](./counter-script/) is a script that calls a contract to increment a counter. - [Name-Registry](./name-registry/) allows users to perform transactions with human readable names instead of addresses. - [Oracle](./oracle) is a smart contract that provides off-chain data to on-chain applications. #### Games - [TicTacToe](./TicTacToe) is a game where two players compete to align three markers in a row. #### Legacy low-maintenance application - [Automated Market Maker (AMM)](./AMM) is a decentralized exchange protocol that manages liquidity pools supplied by its users and determines prices algorithmically while exchanging assets. Its tests and functionality are not currently verified. ## Project status and toolchains Every project is a legacy snapshot. The versions below come from each committed `fuel-toolchain.toml`; the date is the last commit that changed that file. It is not a claim that the combination still installs or passes today. GitHub no longer exposes a retained successful CI run for this repository, so a durable per-application “last passing” date cannot be recovered from public workflow history. | Application | Recorded channel | Forc | Fuel Core | Toolchain file last updated | Status | | --- | --- | --- | --- | --- | --- | | [Airdrop](./airdrop/) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [AMM](./AMM) | `nightly-2024-05-28` | `0.60.0+nightly.20240528.4fe6f1ed51` | `0.26.0` | 2024-05-28 | Legacy; tests and functionality unverified | | [DAO](./DAO) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [English Auction](./english-auction) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [Escrow](./escrow) | `nightly-2024-05-28` | `0.59.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [Fractional NFT](./fractional-NFT) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [Fundraiser](./fundraiser/) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [Multisig Wallet](./multisig-wallet) | `nightly-2024-01-24` | `0.49.1` | `0.22.0` | 2024-03-29 | Legacy; not verified on current releases | | [Name Registry](./name-registry/) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [Native Asset](./native-asset) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [NFT](./NFT) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [Oracle](./oracle) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [OTC Swap Predicate](./OTC-swap-predicate) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [TicTacToe](./TicTacToe) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [Timelock](./timelock) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | | [Counter Script](./counter-script/) | `nightly-2024-05-28` | `0.60.0` | `0.26.0` | 2024-05-28 | Legacy; not verified on current releases | ## Running a project If you wish to run a project, clone this repository and install [`fuelup`](https://install.fuel.network/). Fuelup reads the project's `fuel-toolchain.toml`, but these old dated nightly distributions may no longer restore completely. Do not replace the pin with `latest`: in Fuelup, `latest` is an alias whose meaning is resolved from the live channel manifests, not a pointer to the newest upstream Sway compiler (at the time of writing it tracked the mainnet-compatible distribution). Run `fuelup show` after installing to see what it currently resolves to. Any instructions related to running a specific project will be found within the README.md in the root of that project. Before changing a pin, record the old bytecode and contract IDs, migrate from the latest patch of the old Sway minor where possible, and rerun the Sway, Rust, and end-to-end tests against an explicitly selected target toolchain. ## Contributing Check out the [book](https://swayapps.fuel.network/book/) for more info!

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言