sdk for integrating with the Universal Router contracts
npm install @abstractswap/universal-router-sdkswapERC20CallParameters() to be deprecated in favor of swapCallParameters()typescript
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
`bash
yarn install
yarn test:hardhat
`Run forge integration tests
`bash
forge install
yarn test:forge
``