4.19.5 • Published 5 months ago

@uniswap/universal-router-sdk v4.19.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

universal-router-sdk

This SDK facilitates interactions with the contracts in Universal Router

Usage

Install latest version of universal-router-sdk. Then import the corresponding Trade class and Data object for each protocol you'd like to interact with.

Trading on Uniswap

warning: swapERC20CallParameters() to be deprecated in favor of swapCallParameters()

import { TradeType } from '@uniswap/sdk-core'
import { Trade as V2TradeSDK } from '@uniswap/v2-sdk'
import { Trade as V3TradeSDK } from '@uniswap/v3-sdk'
import { MixedRouteTrade, MixedRouteSDK, Trade as RouterTrade } from '@uniswap/router-sdk'

const options = { slippageTolerance, recipient }
const routerTrade = new RouterTrade({ v2Routes, v3Routes, mixedRoutes, tradeType: TradeType.EXACT_INPUT })
// Use the raw calldata and value returned to call into Universal Swap Router contracts
const { calldata, value } = SwapRouter.swapCallParameters(routerTrade, options)

Running this package

Make sure you are running node v18 Install dependencies and run typescript unit tests

yarn install
yarn test:hardhat

Run forge integration tests

forge install
yarn test:forge
@amygrooove1/smart-order-router-horiza-fork@openos.com/uniswap@infinitebrahmanuniverse/nolb-_unismy_smart_orderrouter@everything-registry/sub-chunk-967@cryptoalgebra/router-2test-dex-smart-order-routerwido-widget-v4wido-widget-v5sperax-smart-order-routertest-swap-widgetstestbluedex-smart-order-routervoronin-smart-order-routerv-swap-smart-order-router@daiaioz/smart-order-router@colligence/smart-order-router@derpdex/smart-order-router@camp-network/uniswap-smart-order-routerjoule-smart-order-routerdimaa-smart-order-routerstratoswap-smart-order-routertstststtest-copy-widgetstokenlauncher-smart-order-router@aperture_finance/uniswap-smart-order-router@atp-tools/crypto@atestalth/widgets@beincom/smart-order-router@beal2912/smart-order-router@biteigen/smart-order-router@bitswap/widgets@bigoceangg/smart-order-router@cheezburgerhq/smart-order-router@0xgingi/uniswap-widgets@0xinti/smart-order-router@adfuel/uniswap-widgets@_etcswap/smart-order-router@aaran1337/smart-order-router@aaran1337/smart-order-router-test@boy-who-cried-wolf/uniswap-widgets@degenfrens/swapper@dex-swap/smart-order-router@dex-swap/widgets@darkeagle1236/smart-order-router@dappworks/mimoswap-sdkwasabi-smart-routeruniswap-widgets-qwquniswap-smart-order-routeruniswap-pool-swapzkflow-smart-order-router@gravityfinance/widgets@hdream/uniswap-pool@forge-trade/smart-order-router@forge-trade/widgets@hemilabs/smart-order-router@florian-s-a-w/smart-order-router@florian-s-a-w/uniswap-smart-order-router@funkichain/smart-order-router@gfxlabs/uniswap-smart-order-router@kunjal_tandel24/smart-order-router@mypublished/widgets@nftearth/uniswap-widgets@mrtruongleo/uniswap-smart-order-router@misfer-alethea/widgets@mokatte/widgets@mokatte/widgets-mod@matterlabs/uniswap-smart-order-router@monoswap-labs/smart-order-router@justdev337/widgets@kayenorg/smart-order-router@jb1011/smart-order-router@jettxcypher/smart-order-router@jettxcypher/warp-smart-order-router@jalaswap/smart-order-router@jagra_/smart-order-router@jagra_/widgets@jaguarswap/smart-order-router@kofime/uniswap-widgets@kokal33/widgets@imclown/smart-order-router@keyko.io/widgets@ketann/smart-order-router-3@rabbitholegg/questdk-plugin-uniswap@openoscom/uniswap@onlytttt/smart-order-router@pondx/smart-order-router@pondx/widgets@pioneer-platform/uniswap-client-v3@platypus-project/uniswap-smart-order-router@pioneer-platform/pioneer-router@pioneer-platform/pro-token@pioneer-platform/uniswap-client@planq-fi/smart-order-router@orbitalapes/smart-order-router@roheat/widgets@romanow/smart-order-routerml-blast-few-smart-order-router-1old-few-smart-order-routerpals_smart_order_routerpancakeswap-bsc-smart-order-router
4.19.1

5 months ago

4.19.2

5 months ago

4.19.3

5 months ago

4.19.4

5 months ago

4.19.5

5 months ago

4.19.0

5 months ago

4.18.1

6 months ago

4.18.0

6 months ago

4.14.1

6 months ago

4.14.0

6 months ago

4.17.0

6 months ago

4.13.0

6 months ago

4.16.0

6 months ago

4.15.0

6 months ago

4.15.1

6 months ago

4.12.0

6 months ago

4.12.1

6 months ago

4.11.0

6 months ago

4.10.0

7 months ago

4.9.0

7 months ago

4.7.1

7 months ago

4.8.0

7 months ago

4.7.0

8 months ago

4.6.2

9 months ago

4.6.1

10 months ago

4.6.0

10 months ago

3.4.0

10 months ago

3.0.4

10 months ago

3.2.0

10 months ago

4.4.1

10 months ago

4.4.0

10 months ago

4.4.2

10 months ago

4.0.0

10 months ago

4.2.0

10 months ago

3.3.0

10 months ago

3.1.2

10 months ago

3.1.1

10 months ago

3.1.0

10 months ago

4.5.0

10 months ago

4.3.2

10 months ago

4.3.1

10 months ago

4.5.2

10 months ago

4.5.1

10 months ago

4.1.0

10 months ago

4.3.0

10 months ago

4.1.1

10 months ago

3.0.3

11 months ago

3.0.2

11 months ago

3.0.1

11 months ago

3.0.0

11 months ago

2.2.4

12 months ago

2.2.3

12 months ago

2.2.1

1 year ago

2.2.2

1 year ago

2.2.0

1 year ago

2.1.0

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.4-beta.3

1 year ago

2.0.4-beta.1

1 year ago

2.0.4-beta.2

1 year ago

1.9.0

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.7.1

1 year ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.5

2 years ago

1.5.4

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.5.0-beta.2

2 years ago

1.5.0-beta.1

2 years ago

1.5.0-beta.3

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.5.0-beta.0

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago