Skip to content

第四讲:Sway 例子 #6

@SolidityGo

Description

@SolidityGo

Sway 例子

背景

Sway 语言整体和 Solidity 类似, 只是把 Solidity 的语法换成了 Rust.
Sway 中的大部分语法和链上数据结构都能在 Solidity 找到对应的存在.

1. Counter 合约

https://github.com/FuelLabs/sway-applications/blob/master/counter-script/counter/src/main.sw

2. Uniswap V2 合约

https://github.com/FuelLabs/sway-applications/blob/master/AMM/exchange-contract/src/main.sw

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions