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.