@1coinswap/sushi1coin-sdk 中文文档教程

发布于 3年前 浏览 23 项目主页 更新于 3年前

~Sushiswap~ Sushi1COIN Swap SDK

uniswap.org 提供了有关此 SDK 的深入文档。

Purpose of this SDK / repository

为了尽可能保持与 SushiSwap/Uniswap 相同,我们发现如果不实施我们自己的软件包,就无法做到这一点并允许未来可能的升级。 这样我们就可以扩展所有已经存在的内容,并进行我们认为合适的修改。

如果一切顺利,我们将能够继续使用 SushiSwap SDK 的新修订版,而无需修改此包。 前提是原始 SDK 没有发生重大变化(非向后兼容的应用程序破坏代码)。

这对于任何想要启动 SushiSwap 克隆的人来说都非常有用。

Running tests

要运行测试,请按照以下步骤操作。 您必须至少安装 node v10 和 yarn

首先克隆存储库:

git clone https://github.com/sushiswap/sushiswap-sdk.git

移至 sushiswap-sdk 工作目录

cd sushiswap-sdk/

安装依赖

yarn install

项运行测试

yarn test

您应该看到如下输出:

yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.

~Sushiswap~ Sushi1COIN Swap SDK

In-depth documentation on this SDK is available at uniswap.org.

Purpose of this SDK / repository

Wanting to keep as much the same as SushiSwap/Uniswap as possible, we found there was no way to do this and allow potential future upgrades, without implementing our own package. This way we can just expand on all that already exists, and make modifications as we see fit.

If all goes well, we will be able to continue to use new revisions of the SushiSwap SDK without having to modify this package. Provided the original SDK does not change drastically (Non backwards compatible application breaking code).

This can be very useful for anyone looking to launch a SushiSwap clone.

Running tests

To run the tests, follow these steps. You must have at least node v10 and yarn installed.

First clone the repository:

git clone https://github.com/sushiswap/sushiswap-sdk.git

Move into the sushiswap-sdk working directory

cd sushiswap-sdk/

Install dependencies

yarn install

Run tests

yarn test

You should see output like the following:

yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文