pancake swap sdk
1.0.0
注意
移至https://github.com/pancakeswap/pancake-frontend/tree/develop/packages/swap-sdk
从uniswap SDK分叉。
您可以参考UNISWAP SDK文档uniswap.org。
要运行测试,请按照以下步骤操作。您必须至少安装了节点V10和纱线。
首先克隆存储库:
git clone https://github.com/pancakeswap/pancake-swap-sdk.git
进入Pancakeswap-SDK工作目录
cd pancakeswap-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.