Tags: Dargon789/sdks
Tags
Uniswap sdk (#73) * feat(smart-wallet): add executeUserOp * Update check-pr-title.yaml * feat(smart-wallet): add executeUserOp * Revert "feat(uniswapx-sdk): graduate to stable v3.0.0 (Uniswap#545)" This reverts commit dc9c963. * feat(v2-sdk): bump sdk-core in v2 to support x-layer (Uniswap#463) * feat(v3-sdk): Bump sdk-core for v3 to support x-layer (Uniswap#464) * feat(v4-sdk): Bump sdk-core version to support x-layer (Uniswap#465) * feat(router-sdk): bump sdks for xlayer (Uniswap#466) * feat(ur-sdk): bump sdks for xlayer (Uniswap#467) ## Description bump sdks in ur-sdk for xlayer ## How Has This Been Tested? _[e.g. Manually, E2E tests, unit tests, Storybook]_ ## Are there any breaking changes? _[e.g. Type definitions, API definitions]_ If there are breaking changes, please ensure you bump the major version Bump the major version (by using the title `feat(breaking): ...`), post a notice in #eng-sdks, and explicitly notify all Uniswap Labs consumers of the SDK. ## (Optional) Feedback Focus _[Specific parts of this PR you'd like feedback on, or that reviewers should pay closer attention to]_ ## (Optional) Follow Ups _[Things that weren't addressed in this PR, ways you plan to build on this work, or other ways this work could be extended]_ <!-- claude-pr-description-start --> --- ## ✨ Claude-Generated Content ## Description Bumps SDK dependencies in universal-router-sdk and adds X-Layer chain configuration to enable X-Layer support. This follows the recent SDK version bumps (Uniswap#463, Uniswap#464, Uniswap#465, Uniswap#466) that added X-Layer support to the individual SDKs. ## Changes - Updated `@uniswap/router-sdk` version in `sdks/universal-router-sdk/package.json` from `^2.1.0` to `^2.3.0` - Updated `@uniswap/sdk-core` version from `^7.8.0` to `^7.10.0` - Updated `@uniswap/v2-sdk` version from `^4.16.0` to `^4.17.0` - Updated `@uniswap/v3-sdk` version from `^3.26.0` to `^3.27.0` - Updated `@uniswap/v4-sdk` version from `^1.23.0` to `^1.24.0` - Added X-Layer chain configuration (chain ID 196) in `constants.ts` with WETH address and Universal Router addresses for V1_2, V2_0, and V2_1 - Updated `yarn.lock` to reflect the new dependency versions ## How Has This Been Tested? Will test in routing ## Are there any breaking changes? No <!-- claude-pr-description-end --> * feat(uniswapx-sdk): add V4 hybrid order support (Uniswap#432) * feat(smart-wallet-sdk): add X-Layer support (Uniswap#468) * feat(v4-sdk): Revert Add max hop slippage (Uniswap#470) * feat(universal-router-sdk): Revert Universal Router 2.1 support (Uniswap#471) ## Description Revert Universal Router 2.1 support ## How Has This Been Tested? _[e.g. Manually, E2E tests, unit tests, Storybook]_ ## Are there any breaking changes? _[e.g. Type definitions, API definitions]_ If there are breaking changes, please ensure you bump the major version Bump the major version (by using the title `feat(breaking): ...`), post a notice in #eng-sdks, and explicitly notify all Uniswap Labs consumers of the SDK. ## (Optional) Feedback Focus _[Specific parts of this PR you'd like feedback on, or that reviewers should pay closer attention to]_ ## (Optional) Follow Ups _[Things that weren't addressed in this PR, ways you plan to build on this work, or other ways this work could be extended]_ <!-- claude-pr-description-start --> --- ## ✨ Claude-Generated Content ## Description Reverts Universal Router 2.1 support that was added in PR Uniswap#442. This PR removes all v2.1-specific features to roll back to a v2.0-only state. ## Changes - Removed `UniversalRouterVersion.V2_1` enum value and all v2.1 router addresses from chain configurations - Deleted `src/utils/eip712.ts` (EIP712 signing utilities for signed route execution) - Deleted `src/entities/actions/across.ts` (Across V4 bridge types) - Removed `SignedRouteOptions`, `EIP712Payload` types and `getExecuteSignedPayload()`, `encodeExecuteSigned()` methods from `swapRouter.ts` - Removed `maxHopSlippage` option from `SwapOptions` interface - Removed `addAcrossBridge()` method and `ACROSS_V4_DEPOSIT_V3` command from `routerCommands.ts` - Removed exports: `NONCE_SKIP_CHECK`, `generateNonce`, `EXECUTE_SIGNED_TYPES`, `getUniversalRouterDomain` - Deleted unit tests for signed routes (`signedRoutes.test.ts`) and Across bridge (`across.test.ts`) - Removed v2.1 documentation from README.md (per-hop slippage, signed routes, cross-chain bridging) ## How Has This Been Tested? Unit tests updated to remove v2.1-specific test cases. ## Are there any breaking changes? Yes - removes the following exports and functionality: - `UniversalRouterVersion.V2_1` - `SignedRouteOptions`, `EIP712Payload` types - `NONCE_SKIP_CHECK`, `generateNonce`, `EXECUTE_SIGNED_TYPES`, `getUniversalRouterDomain` exports - `SwapRouter.getExecuteSignedPayload()` and `SwapRouter.encodeExecuteSigned()` methods - `AcrossV4DepositV3Params` type and `CONTRACT_BALANCE` from across module - `maxHopSlippage` option in `SwapOptions` - Bridge parameters in `SwapRouter.swapCallParameters()` <!-- claude-pr-description-end --> * feat(universal-router-sdk): downgrade universal-router to v2.0.0-beta.2 (Uniswap#473) * feat(ur-sdk): xlayer UR 2.0 (Uniswap#472) ## PR Scope Please title your PR according to the following types and scopes following [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/): - `fix(SDK name):` will trigger a patch version - `chore(<type>):` will not trigger any release and should be used for internal repo changes - `<type>(public):` will trigger a patch version for non-code changes (e.g. README changes) - `feat(SDK name):` will trigger a minor version - `feat(breaking):` will trigger a major version for a breaking change ## Description _[Summary of the change, motivation, and context]_ ## How Has This Been Tested? _[e.g. Manually, E2E tests, unit tests, Storybook]_ ## Are there any breaking changes? _[e.g. Type definitions, API definitions]_ If there are breaking changes, please ensure you bump the major version Bump the major version (by using the title `feat(breaking): ...`), post a notice in #eng-sdks, and explicitly notify all Uniswap Labs consumers of the SDK. ## (Optional) Feedback Focus _[Specific parts of this PR you'd like feedback on, or that reviewers should pay closer attention to]_ ## (Optional) Follow Ups _[Things that weren't addressed in this PR, ways you plan to build on this work, or other ways this work could be extended]_ <!-- claude-pr-description-start --> --- ## ✨ Claude-Generated Content ## Description Adds the Universal Router V2.0 deployment configuration for X-Layer (chain ID 196) by updating from placeholder values to the actual deployed contract address. ## Changes - Updated X-Layer Universal Router V2.0 address from placeholder (`0x0000000000000000000000000000000000000000`) to deployed contract (`0x6bdbd02e751bca2c029cfc21098da04acce8d582`) in `sdks/universal-router-sdk/src/utils/constants.ts` - Updated X-Layer Universal Router V2.0 creation block from `1` to `47680350` ## How Has This Been Tested? Will be tested in routing pipeline. ## Are there any breaking changes? No <!-- claude-pr-description-end --> * fix(router-sdk): bump v4-sdk for ur2.1 revert (Uniswap#474) * feat(universal-router-sdk): Bump router-sdk version (Uniswap#475) * feat(uniswapx-sdk): expand chain 1301 config with Hybrid and Permit2 support (Uniswap#469) Co-authored-by: Alan Wu <alanwu100@gmail.com> Co-authored-by: Alan Wu <60207036+alanhwu@users.noreply.github.com> * fix(v4-sdk): update to use pathInput (Uniswap#476) Co-authored-by: Vasilis Xouris <vasileios.xouris@uniswap.org> Co-authored-by: dianakocsis <diana.kocsis@uniswap.org> * fix(universal-router-sdk): fix xlayer ur 2.0 address (Uniswap#479) * fix(router-sdk): bump v4-sdk to 1.25.1 (priceImpact calc fix) (Uniswap#477) * fix(sdk-core): update xlayer v4 position manager address (Uniswap#480) * fix(universal-router-sdk): bump v4-sdk and router-sdk (priceImpact calc fix) (Uniswap#478) * feat(uniswapx-sdk): add V4 order quoter, validator and integration tests (Uniswap#481) * feat(uniswapx-sdk): bubble v4 quoter revert data (Uniswap#485) * fix(v4-sdk): eth-weth exact output (Uniswap#486) * fix(router-sdk): bump v4-sdk to 1.25.2 in router-sdk (Uniswap#487) * fix(universal-router-sdk): handle ETH/WETH output in V4 split routes (Uniswap#462) Co-authored-by: marktoda <toda.mark@gmail.com> * feat: update ai toolkit ref (Uniswap#488) Co-authored-by: Developer <dev@example.com> Co-authored-by: Nick Koutrelakos <nick.koutrelakos@uniswap.org> * fix(v4-sdk): eth-weth as starting pool (Uniswap#490) * fix(v4-sdk): add comment to trigger release (Uniswap#492) * fix(v4-sdk): more edge cases for eth-weth pools (Uniswap#494) * fix(router-sdk): bump v4-sdk to 1.25.5 (Uniswap#493) * fix(universal-router-sdk): handle ETH-WETH starting pool in split routes (Uniswap#491) * fix(v4-sdk): bump sdk-core to 7.10.1 and v3-sdk to 3.27.0 (Uniswap#496) * fix(router-sdk): bump sdk-core to 7.10.1 and v4-sdk to 1.25.6 (Uniswap#497) * fix(universal-router-sdk): bump router-sdk to 2.3.5 and v4-sdk to 1.25.6 (Uniswap#498) * chore(uniswapx-sdk): update hybrid order (Uniswap#495) * feat(v4-sdk): add max hop slippage support for multi-hop swaps (Uniswap#500) * chore(uniswapx-sdk): new reactor and hook addr (Uniswap#501) * feat(v4-sdk): add URVersion parameter to addAction for V2.1 encoding (Uniswap#502) * feat(router-sdk): bump v4-sdk to 1.27.0 (Uniswap#503) * feat(ur-sdk): Universal Router 2.1 support (Uniswap#504) Co-authored-by: Daniel Gretzke <daniel@gretzke.de> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(sdk-core): Add Linea support (Uniswap#519) * chore(CODEOWNERS): update CO for swap-be SDKs (Uniswap#521) * feat(v3-sdk): bump sdk-core to 7.11.0 (Uniswap#523) * feat(v2-sdk): update V2 SDK @uniswap/sdk-core to version 7.11.0 (Uniswap#522) * feat(v4-sdk): bump sdk-core to 7.11.0 and v3-sdk to 3.28.0 (Uniswap#524) * feat(router-sdk): update SDK versions to 4.18.0, 3.28.0, and 1.28.0 (Uniswap#525) * feat(router-sdk): update SDK core versions to 7.11.0 (Uniswap#526) * feat(universal-router-sdk): bump SDK dependencies to latest versions (Uniswap#527) * feat(sdk-core): add Tempo chain (4217) support (Uniswap#533) * feat(v2-sdk, v3-sdk): bump sdk-core to ^7.12.0 for Tempo chain support (Uniswap#536) * feat(v4-sdk): bump sdk-core to ^7.12.0 and v3-sdk to 3.29.0 for Tempo (Uniswap#537) * feat(router-sdk): bump SDK deps for Tempo chain support (Uniswap#538) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * fix(sdk-core): remove WETH9 entry for Tempo chain (4217) (Uniswap#540) * fix(v2-sdk, v3-sdk): bump sdk-core to ^7.12.1 for Tempo WETH9 fix (Uniswap#541) * fix(v4-sdk): bump sdk-core to ^7.12.1 and v3-sdk to 3.29.1 (Uniswap#542) * fix(router-sdk): bump all SDK deps for Tempo WETH9 fix (Uniswap#543) * feat(universal-router-sdk): add Tempo chain config and bump SDK deps (Uniswap#534) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve zizmor GitHub Actions security findings (Uniswap#516) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * feat(universal-router-sdk): add SwapProxy support for no-Permit2 approve+swap flow (Uniswap#518) * feat(uniswapx-sdk): graduate to stable v3.0.0 (Uniswap#545) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * feat: migrate from semantic-release to Changesets with workspace: protocol (Uniswap#539) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * fix: correct changesets/action SHA in release workflow (Uniswap#548) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * fix: add registry-url for npm OIDC auth and mark uniswapx-integration private (Uniswap#549) * test: dummy sdk-core patch to validate changeset workflow (Uniswap#547) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * fix: use exact workspace versions for cascading changesets (Uniswap#551) * fix: remove registry-url to fix npm Trusted Publishing OIDC auth (Uniswap#552) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * chore: Version Packages (Uniswap#550) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: David Gilman <david.gilman@uniswap.org> * chore: remove push-branches-from-main workflow (Uniswap#555) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * ci: skip unnecessary workflows on changeset-release branches (Uniswap#554) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * fix(v4-sdk): increase liquidity fix (Uniswap#558) * feat(router-sdk): add maxHopSlippage to Trade.swaps (Uniswap#529) ## Description For maxHopSlippage, **a partial implementation exists for multi-hop V4-only routes in UR-sdk, but it is incorrect:** 1. Flat array on **`SwapOptions`** -- A single `maxHopSlippage?: BigNumber[]` on `SwapOptions` cannot correctly map values to specific routes in a split-route trade (e.g. 40% Route A with 3 hops, 60% Route B with 2 hops). 2. Mixed routes pass the full array -- In `addMixedSwap`, the entire `options.maxHopSlippage` array is passed to V4 sections without slicing; V2/V3 sections get nothing. **We need to ensure that per-hop slippage is saved per** **_route_** **data model, not per** **_trade_** **(i.e. for split route trades)** **This PR adds** `maxHopSlippage` **support to the** `Trade.swaps` **object in router-sdk, enabling per-hop slippage protection for multi-hop swaps across all route types (V2, V3, V4, and mixed routes)** ## How Has This Been Tested? _[e.g. Manually, E2E tests, unit tests, Storybook]_ ## Are there any breaking changes? Purely additive, no breaking changes, no existing code uses the new field yet. Can merge independently. ## Follow Ups - in order to be used in UR-sdk, need to publish minor version bump to router-sdk <!-- claude-pr-description-start --> --- ## ✨ Claude-Generated Content ## Summary Adds `maxHopSlippage` support to the `Trade` class in router-sdk, enabling per-hop slippage protection for multi-hop swaps across all route types (V2, V3, V4, and mixed routes). ## Changes - Added optional `maxHopSlippage?: bigint[]` field to the `swaps` array type in `Trade` class - Extended route input types for V2, V3, V4, and mixed routes to accept `maxHopSlippage` parameter - Propagated `maxHopSlippage` through the constructor for all route types - Extended `fromRoutes()` static method to pass `maxHopSlippage` through populated routes ## How Has This Been Tested? This is a type extension. ## Are there any breaking changes? No - `maxHopSlippage` is an optional parameter with no changes to existing behavior. <!-- claude-pr-description-end --> * feat(breaking): switch v4-sdk from UR v2.1 to UR v2.1.1 & add single-hop ABI struct (Uniswap#530) ## Description - Rename URVersion.V2_1 to `V2_1_1 `in v4-sdk - Rename V4_SWAP_ACTIONS_V2_1 to `V4_SWAP_ACTIONS_V2_1_1` and update all references in v4Planner.ts ## How Has This Been Tested? _[e.g. Manually, E2E tests, unit tests, Storybook]_ ## Are there any breaking changes? The version rename is breaking. (And it is intentionally breaking, as opposed to keeping v2.1 around, because v2.1.1 fixes a precision bug. Plus we don't actually use v2.1 in prod yet) 1. publish v4-sdk as major version 2. update UR-sdk and router-SDK ## (Optional) Feedback Focus _[Specific parts of this PR you'd like feedback on, or that reviewers should pay closer attention to]_ ## (Optional) Follow Ups Need to explicitly update UR-sdk and router-SDK versions <!-- claude-pr-description-start --> --- ## ✨ Claude-Generated Content ## Summary Updates v4-sdk to use Universal Router version 2.1.1 instead of 2.1 by renaming version enums, ABI definitions, and struct types throughout the codebase. Adds V2.1.1-specific struct definitions for single-hop swap actions. ## Changes - Renamed `URVersion.V2_1` to `URVersion.V2_1_1` in the `URVersion` enum - Renamed `V4_SWAP_ACTIONS_V2_1` to `V4_SWAP_ACTIONS_V2_1_1` and expanded to include single-hop swap actions (`SWAP_EXACT_IN_SINGLE`, `SWAP_EXACT_OUT_SINGLE`) - Added new V2.1.1 struct definitions with `maxHopSlippage` field: - `SWAP_EXACT_IN_SINGLE_STRUCT_V2_1_1` - `SWAP_EXACT_IN_STRUCT_V2_1_1` - `SWAP_EXACT_OUT_SINGLE_STRUCT_V2_1_1` - `SWAP_EXACT_OUT_STRUCT_V2_1_1` - Renamed V2.0 single-hop structs to be explicit: `SWAP_EXACT_IN_SINGLE_STRUCT_V2_0`, `SWAP_EXACT_OUT_SINGLE_STRUCT_V2_0` - Refactored `addTrade` method to use conditional spread operator for cleaner version-specific struct building - Added validation that `maxHopSlippage` length matches `route.pools.length` - Updated `v4BaseActionsParser.ts` to use the new version enum and ABI definitions - Updated all comments referencing "V2.1" to "V2.1.1" - Updated all test files to use `URVersion.V2_1_1` ## How Has This Been Tested? Existing unit tests updated to use the new version constant. ## Are there any breaking changes? Yes - this is a breaking change for consumers using `URVersion.V2_1` or `V4_SWAP_ACTIONS_V2_1`. They will need to update to `URVersion.V2_1_1` and `V4_SWAP_ACTIONS_V2_1_1` respectively. <!-- claude-pr-description-end --> * feat(universal-router-sdk): v2.1.1 version rename & ABI structs (Uniswap#531) ## Description TODO : Need to explicitly update UR-sdk and router-SDK versions based on v4-sdk breaking changes - Rename UniversalRouterVersion.V2_1 to V2_1_1 in constants.ts + update contract addresses - Add V2.1.1 ABI definitions for V2/V3 swap commands in routerCommands.ts (the new V2V3_SWAP_COMMANDS_V2_1_1 map) - Make addCommand/createCommand accept optional urVersion parameter for ABI selection This is all infrastructure/plumbing. The new V2.1.1 ABI defs exist but nothing calls them yet. The version rename is technically breaking but no consumers use UR V2.1 from the SDK. ## How Has This Been Tested? _[e.g. Manually, E2E tests, unit tests, Storybook]_ ## Are there any breaking changes? _[e.g. Type definitions, API definitions]_ If there are breaking changes, please ensure you bump the major version Bump the major version (by using the title `feat(breaking): ...`), post a notice in #eng-sdks, and explicitly notify all Uniswap Labs consumers of the SDK. ## (Optional) Feedback Focus _[Specific parts of this PR you'd like feedback on, or that reviewers should pay closer attention to]_ ## (Optional) Follow Ups _[Things that weren't addressed in this PR, ways you plan to build on this work, or other ways this work could be extended]_ <!-- claude-pr-description-start --> --- ## ✨ Claude-Generated Content ## Summary Renames `UniversalRouterVersion.V2_1` to `V2_1_1` and adds ABI infrastructure for V2.1.1 swap commands with `maxHopSlippage` support. ## Changes - Renamed `UniversalRouterVersion.V2_1` to `V2_1_1` in `constants.ts` enum (version string `'2.1'` → `'2.1.1'`) - Updated all chain configs (20+ chains) to use `[UniversalRouterVersion.V2_1_1]` key - Added `V2V3_SWAP_COMMANDS_V2_1_1` ABI definitions for V2/V3 swap commands with extended `maxHopSlippage` parameter: - `V3_SWAP_EXACT_IN` - `V3_SWAP_EXACT_OUT` - `V2_SWAP_EXACT_IN` - `V2_SWAP_EXACT_OUT` - Updated `addCommand()` and `createCommand()` to accept optional `urVersion` parameter for ABI selection - Fixed comment typo in `Parser.V3Actions` case ("v4 swap data" → "v3 position data") ## How Has This Been Tested? Infrastructure/plumbing changes only - the new V2.1.1 ABI definitions exist but are not yet called by any code paths. ## Are there any breaking changes? The version enum rename from `V2_1` to `V2_1_1` is technically breaking, but per the design doc, no consumers currently use V2.1. <!-- claude-pr-description-end --> * feat(universal-router-sdk): wire up per-hop slippage encoding (Uniswap#532) ## Description - Remove maxHopSlippage from SwapOptions - Update Swap interface to carry maxHopSlippage (from trade.swaps) - addV2Swap / addV3Swap: branch on urVersion to encode with or without maxHopSlippage - addV4Swap: read maxHopSlippage from swap instead of options - addMixedSwap: slice maxHopSlippage per section with hop offset tracking - Tests for all protocol paths (V2, V3, V4, mixed) with and without per-hop slippage ## How Has This Been Tested? _[e.g. Manually, E2E tests, unit tests, Storybook]_ ## Are there any breaking changes? If consumers want to use UR v2.1.1, they must update to this version of the UR-sdk. <!-- claude-pr-description-start --> --- ## ✨ Claude-Generated Content ## Summary Wire up per-hop slippage encoding for Universal Router v2.1.1 across all protocol versions (V2, V3, V4, and mixed routes). The `maxHopSlippage` parameter has been moved from `SwapOptions` to individual swaps, enabling granular slippage protection per route. ## Changes ### `sdks/universal-router-sdk/src/entities/actions/uniswap.ts` - Removed `maxHopSlippage` from `SwapOptions` interface - Added `maxHopSlippage?: bigint[]` to the `Swap` interface to carry per-hop slippage from trade.swaps - `addV2Swap`: branches on `urVersion` to encode with/without `maxHopSlippage` for V2_SWAP_EXACT_IN and V2_SWAP_EXACT_OUT commands - `addV3Swap`: branches on `urVersion` to encode with/without `maxHopSlippage` for V3_SWAP_EXACT_IN and V3_SWAP_EXACT_OUT commands - `addV4Swap`: reads `maxHopSlippage` from the swap object instead of options - `addMixedSwap`: tracks `hopOffset` to slice the flat `maxHopSlippage` array per protocol section - Added validation to ensure `maxHopSlippage` length matches `route.pools.length` ### `sdks/universal-router-sdk/README.md` - Updated per-hop slippage documentation to reflect new API where `maxHopSlippage` is specified on each route within `RouterTrade` - Added mixed routes example showing how the SDK slices hop slippage by section - Updated references from v2.1 to v2.1.1 ### `sdks/universal-router-sdk/test/unit/perHopSlippage.test.ts` (new) - Tests for V2_SWAP_EXACT_IN/OUT with maxHopSlippage (V2.1.1 ABI) - Tests for V3_SWAP_EXACT_IN/OUT with maxHopSlippage (V2.1.1 ABI) - Tests for empty maxHopSlippage arrays - Backward compatibility tests (V2.0 ABI without maxHopSlippage) - Mixed route slippage slicing tests ## How Has This Been Tested? Unit tests covering all protocol paths (V2, V3, V4, mixed) with and without per-hop slippage encoding. ## Are there any breaking changes? **Minor breaking change**: `maxHopSlippage` has been removed from `SwapOptions`. Consumers must now specify `maxHopSlippage` on individual routes within the `RouterTrade` constructor. Migration: ```typescript // Before (v2.1) SwapRouter.swapCallParameters(trade, { maxHopSlippage: [...], urVersion: URVersion.V2_1 }) // After (v2.1.1) const trade = new RouterTrade({ v3Routes: [{ routev3, inputAmount, outputAmount, maxHopSlippage: [...] }], tradeType, }) SwapRouter.swapCallParameters(trade, { urVersion: URVersion.V2_1_1 }) ``` <!-- claude-pr-description-end --> * chore: migrate monorepo from Yarn to Bun (Uniswap#556) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * feat(ur-sdk): PAY_PORTION_FULL_PRECISION support (Uniswap#528) * fix: use bun/yarn npm publish to resolve workspace:* protocol (Uniswap#562) * Version Packages (Uniswap#563) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Thachil <github@thomasthachil.com> * feat(release): changesets for UR v2.1.1 releases (Uniswap#560) a changeset changelog update. will auto-bump + release SDKs once merged * chore(ur-sdk): swap out URVersions from v4-sdk for UniversalRouterVersion (Uniswap#565) ## Description previously we were exporting URVersion from v4-sdk for the `urVersion` field in universal-router-sdk's `SwapOptions`. it's a strange import pattern, and also forces ur-sdk consumers to import v4-sdk just for the typing we should use UniversalRouterVersion from universal-router-sdk. ## How Has This Been Tested? ran tests ## Are there any breaking changes? _[e.g. Type definitions, API definitions]_ If there are breaking changes, please ensure you bump the major version Bump the major version (by using the title `feat(breaking): ...`), post a notice in #eng-sdks, and explicitly notify all Uniswap Labs consumers of the SDK. * feat(ur-sdk): release bump UR-sdk to 5.1.0 (Uniswap#566) ## PR Scope Please title your PR according to the following types and scopes following [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/): - `fix(SDK name):` will trigger a patch version - `chore(<type>):` will not trigger any release and should be used for internal repo changes - `<type>(public):` will trigger a patch version for non-code changes (e.g. README changes) - `feat(SDK name):` will trigger a minor version - `feat(breaking):` will trigger a major version for a breaking change ## Description _[Summary of the change, motivation, and context]_ ## How Has This Been Tested? _[e.g. Manually, E2E tests, unit tests, Storybook]_ ## Are there any breaking changes? _[e.g. Type definitions, API definitions]_ If there are breaking changes, please ensure you bump the major version Bump the major version (by using the title `feat(breaking): ...`), post a notice in #eng-sdks, and explicitly notify all Uniswap Labs consumers of the SDK. ## (Optional) Feedback Focus _[Specific parts of this PR you'd like feedback on, or that reviewers should pay closer attention to]_ ## (Optional) Follow Ups _[Things that weren't addressed in this PR, ways you plan to build on this work, or other ways this work could be extended]_ * feat(config): add supply chain security controls (Uniswap#570) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: replace npx tsx with bun run in flashtestations-sdk examples (Uniswap#573) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update sdks/flashtestations-sdk/package.json Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/smart-wallet-sdk/package.json Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/uniswapx-sdk/integration/package.json Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/uniswapx-sdk/integration/package.json Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/smart-wallet-sdk/src/smartWallet.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/uniswapx-sdk/src/order/v4/HybridOrder.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/uniswapx-sdk/src/order/v4/HybridOrder.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/uniswapx-sdk/src/builder/HybridOrderBuilder.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/uniswapx-sdk/src/builder/HybridOrderBuilder.test.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/uniswapx-sdk/src/order/v4/hashing.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/uniswapx-sdk/src/utils/OrderQuoter.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/universal-router-sdk/src/entities/actions/uniswap.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update sdks/uniswapx-sdk/src/order/v4/HybridOrder.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> --------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Kristie Huang <kristiehuang01@gmail.com> Co-authored-by: marktoda <toda.mark@gmail.com> Co-authored-by: googleworkspace-bot <googleworkspace-bot@google.com> Co-authored-by: cam-uni <cameron.shahmirzadi@uniswap.org> Co-authored-by: Siyu Jiang (See-You John) <91580504+jsy1218@users.noreply.github.com> Co-authored-by: Zach Yang <zhiyuan.zach.yang@gmail.com> Co-authored-by: ens_408 <eric.sanchirico@uniswap.org> Co-authored-by: Alan Wu <alanwu100@gmail.com> Co-authored-by: Alan Wu <60207036+alanhwu@users.noreply.github.com> Co-authored-by: Vasilis Xouris <vasileios.xouris@uniswap.org> Co-authored-by: dianakocsis <diana.kocsis@uniswap.org> Co-authored-by: Daniel Gretzke <daniel@gretzke.de> Co-authored-by: Developer <dev@example.com> Co-authored-by: Nick Koutrelakos <nick.koutrelakos@uniswap.org> Co-authored-by: Ayo Akala <13251173+Ayoakala@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Thomas Thachil <thomasthachil@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: David Gilman <david.gilman@uniswap.org> Co-authored-by: zi-yang-uni <ziyi.yang@uniswap.org> Co-authored-by: Thomas Thachil <github@thomasthachil.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Merge branch 'Uniswap:main' into main
fix: package.json to reduce vulnerabilities (#49) The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-ESLINT-15102420 Co-authored-by: snyk-bot <snyk-bot@snyk.io>
chore(deps): bump the npm_and_yarn group across 2 directories with 9 … …updates Bumps the npm_and_yarn group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) | `5.2.0` | `5.4.0` | | [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) | `7.26.9` | `7.28.4` | | [base-x](https://github.com/cryptocoinjs/base-x) | `3.0.9` | `3.0.11` | | [brace-expansion](https://github.com/juliangruber/brace-expansion) | `1.1.11` | `1.1.12` | | [cipher-base](https://github.com/crypto-browserify/cipher-base) | `1.0.4` | `1.0.7` | | [js-yaml](https://github.com/nodeca/js-yaml) | `3.14.1` | `3.14.2` | | [pbkdf2](https://github.com/browserify/pbkdf2) | `3.1.2` | `3.1.5` | | [sha.js](https://github.com/crypto-browserify/sha.js) | `2.4.11` | `2.4.12` | | [undici](https://github.com/nodejs/undici) | `5.28.5` | `5.29.0` | Bumps the npm_and_yarn group with 1 update in the /sdks/universal-router-sdk directory: [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts). Updates `@openzeppelin/contracts` from 5.2.0 to 5.4.0 - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md) - [Commits](OpenZeppelin/openzeppelin-contracts@v5.2.0...v5.4.0) Updates `@babel/helpers` from 7.26.9 to 7.28.4 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.28.4/packages/babel-helpers) Updates `base-x` from 3.0.9 to 3.0.11 - [Commits](cryptocoinjs/base-x@v3.0.9...v3.0.11) Updates `brace-expansion` from 1.1.11 to 1.1.12 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@1.1.11...v1.1.12) Updates `cipher-base` from 1.0.4 to 1.0.7 - [Changelog](https://github.com/browserify/cipher-base/blob/master/CHANGELOG.md) - [Commits](browserify/cipher-base@v1.0.4...v1.0.7) Updates `js-yaml` from 3.14.1 to 3.14.2 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@3.14.1...3.14.2) Updates `pbkdf2` from 3.1.2 to 3.1.5 - [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md) - [Commits](browserify/pbkdf2@v3.1.2...v3.1.5) Updates `sha.js` from 2.4.11 to 2.4.12 - [Changelog](https://github.com/browserify/sha.js/blob/master/CHANGELOG.md) - [Commits](browserify/sha.js@v2.4.11...v2.4.12) Updates `undici` from 5.28.5 to 5.29.0 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v5.28.5...v5.29.0) Updates `@openzeppelin/contracts` from 5.2.0 to 5.4.0 - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md) - [Commits](OpenZeppelin/openzeppelin-contracts@v5.2.0...v5.4.0) --- updated-dependencies: - dependency-name: "@openzeppelin/contracts" dependency-version: 5.4.0 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: "@babel/helpers" dependency-version: 7.28.4 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: base-x dependency-version: 3.0.11 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: brace-expansion dependency-version: 1.1.12 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: cipher-base dependency-version: 1.0.7 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: js-yaml dependency-version: 3.14.2 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: pbkdf2 dependency-version: 3.1.5 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: sha.js dependency-version: 2.4.12 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: undici dependency-version: 5.29.0 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: "@openzeppelin/contracts" dependency-version: 5.4.0 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
chore(deps): bump the npm_and_yarn group across 2 directories with 9 … …updates Bumps the npm_and_yarn group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) | `5.2.0` | `5.4.0` | | [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) | `7.26.9` | `7.28.4` | | [base-x](https://github.com/cryptocoinjs/base-x) | `3.0.9` | `3.0.11` | | [brace-expansion](https://github.com/juliangruber/brace-expansion) | `1.1.11` | `1.1.12` | | [cipher-base](https://github.com/crypto-browserify/cipher-base) | `1.0.4` | `1.0.7` | | [js-yaml](https://github.com/nodeca/js-yaml) | `3.14.1` | `3.14.2` | | [pbkdf2](https://github.com/browserify/pbkdf2) | `3.1.2` | `3.1.5` | | [sha.js](https://github.com/crypto-browserify/sha.js) | `2.4.11` | `2.4.12` | | [undici](https://github.com/nodejs/undici) | `5.28.5` | `5.29.0` | Bumps the npm_and_yarn group with 1 update in the /sdks/universal-router-sdk directory: [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts). Updates `@openzeppelin/contracts` from 5.2.0 to 5.4.0 - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md) - [Commits](OpenZeppelin/openzeppelin-contracts@v5.2.0...v5.4.0) Updates `@babel/helpers` from 7.26.9 to 7.28.4 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.28.4/packages/babel-helpers) Updates `base-x` from 3.0.9 to 3.0.11 - [Commits](cryptocoinjs/base-x@v3.0.9...v3.0.11) Updates `brace-expansion` from 1.1.11 to 1.1.12 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@1.1.11...v1.1.12) Updates `cipher-base` from 1.0.4 to 1.0.7 - [Changelog](https://github.com/browserify/cipher-base/blob/master/CHANGELOG.md) - [Commits](browserify/cipher-base@v1.0.4...v1.0.7) Updates `js-yaml` from 3.14.1 to 3.14.2 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@3.14.1...3.14.2) Updates `pbkdf2` from 3.1.2 to 3.1.5 - [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md) - [Commits](browserify/pbkdf2@v3.1.2...v3.1.5) Updates `sha.js` from 2.4.11 to 2.4.12 - [Changelog](https://github.com/browserify/sha.js/blob/master/CHANGELOG.md) - [Commits](browserify/sha.js@v2.4.11...v2.4.12) Updates `undici` from 5.28.5 to 5.29.0 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v5.28.5...v5.29.0) Updates `@openzeppelin/contracts` from 5.2.0 to 5.4.0 - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md) - [Commits](OpenZeppelin/openzeppelin-contracts@v5.2.0...v5.4.0) --- updated-dependencies: - dependency-name: "@openzeppelin/contracts" dependency-version: 5.4.0 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: "@babel/helpers" dependency-version: 7.28.4 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: base-x dependency-version: 3.0.11 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: brace-expansion dependency-version: 1.1.12 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: cipher-base dependency-version: 1.0.7 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: js-yaml dependency-version: 3.14.2 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: pbkdf2 dependency-version: 3.1.5 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: sha.js dependency-version: 2.4.12 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: undici dependency-version: 5.29.0 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: "@openzeppelin/contracts" dependency-version: 5.4.0 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
chore(deps): bump the npm_and_yarn group across 1 directory with 2 up… …dates Bumps the npm_and_yarn group with 2 updates in the / directory: [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) and [undici](https://github.com/nodejs/undici). Updates `@openzeppelin/contracts` from 5.1.0 to 5.2.0 - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md) - [Commits](OpenZeppelin/openzeppelin-contracts@v5.1.0...v5.2.0) Updates `undici` from 5.28.4 to 5.28.5 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v5.28.4...v5.28.5) --- updated-dependencies: - dependency-name: "@openzeppelin/contracts" dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: undici dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>