Skip to content

fix chain id and swap token #483

Open
Dargon789 wants to merge 96 commits intoUniswap:mainfrom
Dargon789:main
Open

fix chain id and swap token #483
Dargon789 wants to merge 96 commits intoUniswap:mainfrom
Dargon789:main

Conversation

@Dargon789
Copy link

PR Scope

Please title your PR according to the following types and scopes following conventional commits:

  • 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]

jsy1218 and others added 30 commits July 3, 2024 05:51
Signed-off-by: Legion's  <64915515+Dargon789@users.noreply.github.com>
Bumps the npm_and_yarn group with 1 update in the / directory: [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts).


Updates `@openzeppelin/contracts` from 4.7.0 to 4.9.6
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.7.0...v4.9.6)

---
updated-dependencies:
- dependency-name: "@openzeppelin/contracts"
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…dates (#2)

Bumps the npm_and_yarn group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) | `4.9.6` | `5.0.2` |
| [follow-redirects](https://github.com/follow-redirects/follow-redirects) | `1.15.3` | `1.15.9` |
| [secp256k1](https://github.com/cryptocoinjs/secp256k1-node) | `4.0.3` | `4.0.4` |
| [tar](https://github.com/isaacs/node-tar) | `6.2.0` | `6.2.1` |
| [undici](https://github.com/nodejs/undici) | `5.28.2` | `5.28.4` |



Updates `@openzeppelin/contracts` from 4.9.6 to 5.0.2
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.9.6...v5.0.2)

Updates `follow-redirects` from 1.15.3 to 1.15.9
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.3...v1.15.9)

Updates `secp256k1` from 4.0.3 to 4.0.4
- [Release notes](https://github.com/cryptocoinjs/secp256k1-node/releases)
- [Commits](cryptocoinjs/secp256k1-node@v4.0.3...v4.0.4)

Updates `tar` from 6.2.0 to 6.2.1
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v6.2.0...v6.2.1)

Updates `undici` from 5.28.2 to 5.28.4
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](nodejs/undici@v5.28.2...v5.28.4)

---
updated-dependencies:
- dependency-name: "@openzeppelin/contracts"
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: follow-redirects
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: secp256k1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: undici
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the npm_and_yarn group with 1 update in the / directory: [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts).


Updates `@openzeppelin/contracts` from 5.0.2 to 5.1.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.0.2...v5.1.0)

---
updated-dependencies:
- dependency-name: "@openzeppelin/contracts"
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Legion's  <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: Legion's  <64915515+Dargon789@users.noreply.github.com>
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-WS-7266574

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Fix witness typestring generation to omit final closing parenthesis
per The Compact spec, and add comprehensive tests validating complex
nested mandate structures like those used in Tribunal.

Changes:
- Fix buildWitnessTypestring to remove final closing paren
- Add 8 new tests for complex nested mandate types
- Test simple nested structures
- Test arrays in nested structures
- Test alphabetical sorting of multiple nested types
- Test Tribunal-like deeply nested structures with recursive refs
- Test full Tribunal-style mandate with 5 nested types
- Test bytes vs bytes32 in nested structures

Added comprehensive tests to validate SDK mandate encoding against Tribunal's
reference implementation:

- Nested custom types (Mandate_*)
- Arrays of nested types (Mandate_Fill[])
- Recursive type references (Mandate_Compact contains Mandate)
- Complex multi-level nesting (up to 5 nested types)
- Mandate typehash matches Tribunal's MANDATE_TYPEHASH constant
- Mandate_Fill typehash matches MANDATE_FILL_TYPEHASH
- Mandate_FillComponent typehash matches MANDATE_FILL_COMPONENT_TYPEHASH
- Mandate_Lock typehash matches MANDATE_LOCK_TYPEHASH
- All typehashes computed from typestrings match Tribunal contract constants
- Full Tribunal mandate encoding test case from TribunalBasicTest.sol
- Validates encoding structure (address + fillsHash = 64 bytes)
- Verifies hash computation is deterministic

These tests ensure the SDK's EIP-712 encoding is compatible with Tribunal's
on-chain mandate derivation functions (deriveMandateHash, deriveFillHash).
1) Add collectCoverageFrom and coverage reporting configuration to enable test coverage measurement. Includes text, text-summary, and HTML reporters.

2) Add complete parameter and return type documentation to all functions:

Price Curve Library:
- Document all parameters with types and descriptions
- Add return type documentation with value ranges
- Clarify scaling factor semantics (1e18 = neutral)
- Document error conditions and edge cases

Tribunal Builders:
- Full @param documentation for all builder methods
- Document chaining behavior with @returns
- Add class-level documentation with usage examples
- Document build() method preconditions

Convenience Functions:
- Complete parameter documentation for createSameChainFill()
- Full parameter docs for createCrossChainFill()
- Clarify cross-chain callback semantics

3) Add many new test cases for claim and batch claim functionality
…lders

Add extensive class-level and method documentation to all builder classes
in compact.ts and claim.ts, improving API discoverability and usage examples.
Replace basic README with comprehensive documentation covering all aspects
of the SDK usage, from installation to advanced patterns.
Add functional e2e tests using Supersim for testing against forked chains
…eriods

Add E2E test demonstrating batch compacts covering multiple resource locks
with different reset periods, processed in a single batch claim transaction.
Add a simpler `fromCompact()` method to BaseBatchClaimBuilder that pre-fills
sponsor, nonce, expires, and signature from a BatchCompact struct without
requiring ids/amounts upfront. This provides a cleaner API for building batch
claims:

Before:
  ClaimBuilder.batch(domain)
    .sponsor(compact.sponsor)
    .nonce(compact.nonce)
    .expires(compact.expires)
    .addClaim()...

After:
  ClaimBuilder.batch(domain)
    .fromCompact({ compact, signature })
    .addClaim()...

The method is inherited by BatchClaimBuilder, BatchMultichainClaimBuilder,
and ExogenousBatchMultichainClaimBuilder, providing consistent API across
all batch claim builder types.
Dargon789 and others added 5 commits February 1, 2026 08:57
…in permissions (#50)

Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
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>
…updates (#48)

Bumps the npm_and_yarn group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) | `7.18.9` | `7.26.10` |
| [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) | `4.7.0` | `4.9.6` |
| [js-yaml](https://github.com/nodeca/js-yaml) | `3.14.1` | `3.14.2` |
| [jws](https://github.com/brianloveswords/node-jws) | `3.2.2` | `3.2.3` |
| [tar](https://github.com/isaacs/node-tar) | `7.5.1` | `7.5.7` |

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 `@babel/runtime` from 7.18.9 to 7.26.10
- [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.26.10/packages/babel-runtime)

Updates `@openzeppelin/contracts` from 4.7.0 to 4.9.6
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.7.0...v4.9.6)

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 `jws` from 3.2.2 to 3.2.3
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](auth0/node-jws@v3.2.2...v3.2.3)

Updates `tar` from 7.5.1 to 7.5.7
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v7.5.1...v7.5.7)

Updates `@openzeppelin/contracts` from 4.7.0 to 4.9.6
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.7.0...v4.9.6)

Updates `@openzeppelin/contracts` from 4.7.0 to 4.9.6
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.7.0...v4.9.6)

Updates `@openzeppelin/contracts` from 4.7.0 to 4.9.6
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.7.0...v4.9.6)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-version: 7.26.10
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@openzeppelin/contracts"
  dependency-version: 4.9.6
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: jws
  dependency-version: 3.2.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-version: 7.5.7
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@openzeppelin/contracts"
  dependency-version: 4.9.6
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@openzeppelin/contracts"
  dependency-version: 4.9.6
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@openzeppelin/contracts"
  dependency-version: 4.9.6
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@socket-security
Copy link

socket-security bot commented Feb 1, 2026

@socket-security
Copy link

socket-security bot commented Feb 1, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
High CVE: Axios is Vulnerable to Denial of Service via __proto__ Key in mergeConfig

CVE: GHSA-43fc-jf86-j433 Axios is Vulnerable to Denial of Service via proto Key in mergeConfig (HIGH)

Affected versions: < 1.13.5

Patched version: 1.13.5

From: sdks/the-compact-sdk/package.jsonnpm/axios@1.13.4

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/axios@1.13.4. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Dynamic module loading: npm @eslint/config-array

Location: Package overview

From: ?npm/eslint@9.39.2npm/@eslint/config-array@0.21.1

ℹ Read more on: This package | This alert | What is dynamic require?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should avoid dynamic imports when possible. Audit the use of dynamic require to ensure it is not executing malicious or vulnerable code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@eslint/config-array@0.21.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Dynamic module loading: npm @sinonjs/fake-timers

Location: Package overview

From: ?npm/jest-environment-node@26.0.0npm/@sinonjs/fake-timers@6.0.1

ℹ Read more on: This package | This alert | What is dynamic require?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should avoid dynamic imports when possible. Audit the use of dynamic require to ensure it is not executing malicious or vulnerable code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@sinonjs/fake-timers@6.0.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Low
Dynamic module loading: npm ethers

Location: Package overview

From: sdks/permit2-sdk/package.jsonnpm/ethers@6.16.0

ℹ Read more on: This package | This alert | What is dynamic require?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should avoid dynamic imports when possible. Audit the use of dynamic require to ensure it is not executing malicious or vulnerable code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/ethers@6.16.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Dargon789 and others added 9 commits February 1, 2026 14:53
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
…#46)

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
* fix: sdks/permit2-sdk/package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844

* fix: sdks/permit2-sdk/package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844

* fix: sdks/permit2-sdk/package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844

---------

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: snyk-io[bot] <141718529+snyk-io[bot]@users.noreply.github.com>
dependabot bot and others added 5 commits February 1, 2026 18:49
…dates (#57)

Bumps the npm_and_yarn group with 3 updates in the / directory: [eslint](https://github.com/eslint/eslint), [diff](https://github.com/kpdecker/jsdiff) and [lodash](https://github.com/lodash/lodash).


Updates `eslint` from 8.57.1 to 9.26.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/v9.26.0/CHANGELOG.md)
- [Commits](eslint/eslint@v8.57.1...v9.26.0)

Updates `diff` from 4.0.2 to 4.0.4
- [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md)
- [Commits](kpdecker/jsdiff@v4.0.2...v4.0.4)

Updates `lodash` from 4.17.21 to 4.17.23
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.26.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: diff
  dependency-version: 4.0.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: sdks/uniswapx-sdk/package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844
- https://snyk.io/vuln/SNYK-JS-ESLINT-15102420

* fix: sdks/uniswapx-sdk/package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844
- https://snyk.io/vuln/SNYK-JS-ESLINT-15102420

---------

Co-authored-by: snyk-io[bot] <141718529+snyk-io[bot]@users.noreply.github.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
* fix: sdks/uniswapx-sdk/integration/package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844
- https://snyk.io/vuln/SNYK-JS-UNDICI-14943963
- https://snyk.io/vuln/SNYK-JS-INFLIGHT-6095116

* fix: sdks/uniswapx-sdk/integration/package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ELLIPTIC-14908844
- https://snyk.io/vuln/SNYK-JS-UNDICI-14943963
- https://snyk.io/vuln/SNYK-JS-INFLIGHT-6095116

---------

Co-authored-by: snyk-io[bot] <141718529+snyk-io[bot]@users.noreply.github.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants