Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第四讲:Sway 例子 #6

Open
SolidityGo opened this issue Oct 12, 2024 · 0 comments
Open

第四讲:Sway 例子 #6

SolidityGo opened this issue Oct 12, 2024 · 0 comments

Comments

@SolidityGo
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant