4.19.5 • Published 12 months ago

@uniswap/universal-router-sdk v4.19.5

Weekly downloads
-
License
MIT
Repository
github
Last release
12 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-routerjoule-smart-order-routerlolotrgeek-smart-order-routermeme-widgets@waterfor9/smart-order-router@warpgatex/warp-smart-order-router@web3auth/smart-order-router@woafflation/smart-order-router@wunsz-4soft/smart-order-router@wunsz-4soft/uniswap-widgets@xeiswap/smart-order-router@wtchtwr/uniswap-widgets@trugly-labs/widgets-fork@tryethernal/smart-order-router@uniswapfoundation/smart-order-router@uniswap/widgets@uniswap/smart-order-router@totality-fi/smart-order-router@tokamak-network/tokamak-smart-order-router@toadsarah/smart-order-router@toadsarah/smart-order-router-spooky@vivektamilarasan/smart-order-router@vanadex/smart-order-router@xswap-v3/smart-order-router@yodlpay/smart-order-router@zalastax/nolb-_unis@ziadex/smart-order-router@tendieswap/routing-api@zoralabs/uniswap-smart-order-routerforgetwidgetselektrik-smart-order-routereasydefi_packagefew-new-smart-order-routerfew-smart-order-routerfew-smart-order-router-1few-smart-order-router-2few-smart-order-router-3few-smart-order-router-4few-smart-order-router-5few-smart-order-router-6few-smart-order-router-interfacefew-smart-order-router-interface-2few-smart-order-router-interface-3few-smart-order-router-interface-4flaex-smart-order-routerfixed-smart-order-routerckflow-smart-order-routercypress-hardhatblueswap-smart-order-routerblueswapbasewidgetsblast-few-smart-order-router-1blast-few-smart-order-router-2dmode-smart-order-routerdimaa-smart-order-routerstratoswap-smart-order-routertstststtest-copy-widgetstokenlauncher-smart-order-routerwasabi-smart-routeruniswap-widgets-qwquniswap-smart-order-routeruniswap-pool-swapzkflow-smart-order-routerml-blast-few-smart-order-router-1old-few-smart-order-routerpals_smart_order_routerpancakeswap-bsc-smart-order-routerpancake-routerph-typescript-lib-uniswapph-typecript-lib-uniswapsmart-order-route-sushismart-order-router-arbidexshady-smart-order-router@subasshrestha/warp-smart-order-router@subasshrestha/warp-smart-order-router-test@subasshrestha/smart-order-router@stevyhacker/smart-order-router@swapnity/smart-order-router@synthra-swap/smart-order-router@sunmoon11100/uniswap-widgets@tangleswap/orbit-router@kunjal_tandel24/smart-order-router@lamlv/smart-order-router@spookyswaptest-er/smart-order-router@spookyswaptest/smart-order-router@spookyswaptestnet/smart-order-router@spooky-swap-dex/smart-order-router
4.19.1

12 months ago

4.19.2

12 months ago

4.19.3

12 months ago

4.19.4

12 months ago

4.19.5

12 months ago

4.19.0

1 year ago

4.18.1

1 year ago

4.18.0

1 year ago

4.14.1

1 year ago

4.14.0

1 year ago

4.17.0

1 year ago

4.13.0

1 year ago

4.16.0

1 year ago

4.15.0

1 year ago

4.15.1

1 year ago

4.12.0

1 year ago

4.12.1

1 year ago

4.11.0

1 year ago

4.10.0

1 year ago

4.9.0

1 year ago

4.7.1

1 year ago

4.8.0

1 year ago

4.7.0

1 year ago

4.6.2

1 year ago

4.6.1

1 year ago

4.6.0

1 year ago

3.4.0

1 year ago

3.0.4

1 year ago

3.2.0

1 year ago

4.4.1

1 year ago

4.4.0

1 year ago

4.4.2

1 year ago

4.0.0

1 year ago

4.2.0

1 year ago

3.3.0

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

4.5.0

1 year ago

4.3.2

1 year ago

4.3.1

1 year ago

4.5.2

1 year ago

4.5.1

1 year ago

4.1.0

1 year ago

4.3.0

1 year ago

4.1.1

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.2.4

2 years ago

2.2.3

2 years ago

2.2.1

2 years ago

2.2.2

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.4-beta.3

2 years ago

2.0.4-beta.1

2 years ago

2.0.4-beta.2

2 years ago

1.9.0

2 years ago

1.8.2

2 years ago

1.8.1

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.5

3 years ago

1.5.4

3 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

3 years ago

1.5.6

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.5.0-beta.2

3 years ago

1.5.0-beta.1

3 years ago

1.5.0-beta.3

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.5.0-beta.0

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 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