Skip to content

Commit

Permalink
feat(universal-router-sdk): support unichain mainnet on universal-rou…
Browse files Browse the repository at this point in the history
…ter-sdk (#206)
  • Loading branch information
xrsv authored Nov 25, 2024
1 parent 6fa9718 commit 1eede93
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 79 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/monorepo-integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
run: yarn g:check:deps:mismatch

# This check will be disabled while a major version change of sdk-core is underway
# - name: 👬🏽 Check for duplicate dependencies in lock file
# run: yarn dedupe --check
- name: 👬🏽 Check for duplicate dependencies in lock file
run: yarn dedupe --check

- name: 🧑‍⚖️ Check for yarn constraints.pro
run: yarn constraints
10 changes: 5 additions & 5 deletions sdks/universal-router-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
"dependencies": {
"@openzeppelin/contracts": "4.7.0",
"@uniswap/permit2-sdk": "^1.3.0",
"@uniswap/router-sdk": "^1.14.3",
"@uniswap/sdk-core": "^5.8.2",
"@uniswap/router-sdk": "^1.15.0",
"@uniswap/sdk-core": "^6.0.0",
"@uniswap/universal-router": "2.0.0-beta.2",
"@uniswap/v2-core": "^1.0.1",
"@uniswap/v2-sdk": "^4.6.0",
"@uniswap/v2-sdk": "^4.7.0",
"@uniswap/v3-core": "1.0.0",
"@uniswap/v3-sdk": "^3.18.1",
"@uniswap/v4-sdk": "^1.10.3",
"@uniswap/v3-sdk": "^3.19.0",
"@uniswap/v4-sdk": "^1.12.0",
"bignumber.js": "^9.0.2",
"ethers": "^5.7.0"
},
Expand Down
13 changes: 13 additions & 0 deletions sdks/universal-router-sdk/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,19 @@ export const CHAIN_CONFIGS: { [key: number]: ChainConfig } = {
},
},
},
[130]: {
weth: '0x4200000000000000000000000000000000000006',
routerConfigs: {
[UniversalRouterVersion.V1_2]: {
address: '0x4D73A4411CA1c660035e4AECC8270E5DdDEC8C17',
creationBlock: 23678,
},
[UniversalRouterVersion.V2_0]: {
address: '0x4D73A4411CA1c660035e4AECC8270E5DdDEC8C17',
creationBlock: 23678,
},
},
},
}

export const UNIVERSAL_ROUTER_ADDRESS = (version: UniversalRouterVersion, chainId: number): string => {
Expand Down
86 changes: 14 additions & 72 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4509,17 +4509,17 @@ __metadata:
languageName: unknown
linkType: soft

"@uniswap/router-sdk@npm:^1.14.3":
version: 1.14.3
resolution: "@uniswap/router-sdk@npm:1.14.3"
"@uniswap/router-sdk@npm:^1.15.0":
version: 1.15.0
resolution: "@uniswap/router-sdk@npm:1.15.0"
dependencies:
"@ethersproject/abi": ^5.5.0
"@uniswap/sdk-core": ^5.8.0
"@uniswap/sdk-core": ^6.0.0
"@uniswap/swap-router-contracts": ^1.3.0
"@uniswap/v2-sdk": ^4.6.0
"@uniswap/v3-sdk": ^3.17.0
"@uniswap/v4-sdk": ^1.10.3
checksum: ba7e0800d493c0d5f71c050bb21b475f762e56f81de13be96f29bb792351ef9846929271d8befdab93eae0e2800d64516f93d86eecb0ae894da708f806a1010d
"@uniswap/v2-sdk": ^4.7.0
"@uniswap/v3-sdk": ^3.19.0
"@uniswap/v4-sdk": ^1.12.0
checksum: f41fcec2c06775071e1139426bddb569ab88a314d20d6e7d10a56f6994325b39bdf00105a0b35a7d114a07c17e7ab59360cef5ce4632fba53000f13543ff8284
languageName: node
linkType: hard

Expand All @@ -4539,7 +4539,7 @@ __metadata:
languageName: unknown
linkType: soft

"@uniswap/sdk-core@npm:^5.0.0, @uniswap/sdk-core@npm:^5.3.0, @uniswap/sdk-core@npm:^5.3.1, @uniswap/sdk-core@npm:^5.8.0, @uniswap/sdk-core@npm:^5.8.1, @uniswap/sdk-core@npm:^5.8.2":
"@uniswap/sdk-core@npm:^5.0.0":
version: 5.9.0
resolution: "@uniswap/sdk-core@npm:5.9.0"
dependencies:
Expand Down Expand Up @@ -4647,14 +4647,14 @@ __metadata:
"@types/node": ^18.7.16
"@types/node-fetch": ^2.6.2
"@uniswap/permit2-sdk": ^1.3.0
"@uniswap/router-sdk": ^1.14.3
"@uniswap/sdk-core": ^5.8.2
"@uniswap/router-sdk": ^1.15.0
"@uniswap/sdk-core": ^6.0.0
"@uniswap/universal-router": 2.0.0-beta.2
"@uniswap/v2-core": ^1.0.1
"@uniswap/v2-sdk": ^4.6.0
"@uniswap/v2-sdk": ^4.7.0
"@uniswap/v3-core": 1.0.0
"@uniswap/v3-sdk": ^3.18.1
"@uniswap/v4-sdk": ^1.10.3
"@uniswap/v3-sdk": ^3.19.0
"@uniswap/v4-sdk": ^1.12.0
bignumber.js: ^9.0.2
chai: ^4.3.6
dotenv: ^16.0.3
Expand Down Expand Up @@ -4688,19 +4688,6 @@ __metadata:
languageName: node
linkType: hard

"@uniswap/v2-sdk@npm:^4.6.0":
version: 4.6.0
resolution: "@uniswap/v2-sdk@npm:4.6.0"
dependencies:
"@ethersproject/address": ^5.0.2
"@ethersproject/solidity": ^5.0.9
"@uniswap/sdk-core": ^5.8.0
tiny-invariant: ^1.1.0
tiny-warning: ^1.0.3
checksum: 7ec46ca0780892adaadbab546b05d628cb2aaaef7198f3f92021e10e3adbbf42566ae0f6d7ae1c55afa01f894164b4b8f450cc91f718059a19f5a333115a5f68
languageName: node
linkType: hard

"@uniswap/v2-sdk@npm:^4.7.0":
version: 4.7.0
resolution: "@uniswap/v2-sdk@npm:4.7.0"
Expand Down Expand Up @@ -4758,22 +4745,6 @@ __metadata:
languageName: node
linkType: hard

"@uniswap/v3-sdk@npm:3.12.0":
version: 3.12.0
resolution: "@uniswap/v3-sdk@npm:3.12.0"
dependencies:
"@ethersproject/abi": ^5.5.0
"@ethersproject/solidity": ^5.0.9
"@uniswap/sdk-core": ^5.3.0
"@uniswap/swap-router-contracts": ^1.3.0
"@uniswap/v3-periphery": ^1.1.1
"@uniswap/v3-staker": 1.0.0
tiny-invariant: ^1.1.0
tiny-warning: ^1.0.3
checksum: d8d507a8ed302c983217575bcead36700c4ee823db98ea9281cf8f9e5dfb9a5c49da111199f28f65f43ccb4c4dc2996d8a120128076b622b560fe780f8bb8db5
languageName: node
linkType: hard

"@uniswap/v3-sdk@npm:3.19.0, @uniswap/v3-sdk@npm:^3.19.0":
version: 3.19.0
resolution: "@uniswap/v3-sdk@npm:3.19.0"
Expand All @@ -4790,22 +4761,6 @@ __metadata:
languageName: node
linkType: hard

"@uniswap/v3-sdk@npm:^3.17.0, @uniswap/v3-sdk@npm:^3.18.1":
version: 3.18.1
resolution: "@uniswap/v3-sdk@npm:3.18.1"
dependencies:
"@ethersproject/abi": ^5.5.0
"@ethersproject/solidity": ^5.0.9
"@uniswap/sdk-core": ^5.8.1
"@uniswap/swap-router-contracts": ^1.3.0
"@uniswap/v3-periphery": ^1.1.1
"@uniswap/v3-staker": 1.0.0
tiny-invariant: ^1.1.0
tiny-warning: ^1.0.3
checksum: ab86fb564f3970b9ea8361781e026d539a1b7216d4d248280b619cac7ea9ab859431be38b464582ca1312f37f5ed05a1dc685af63eba4adf4e0148be473cbf21
languageName: node
linkType: hard

"@uniswap/v3-sdk@workspace:sdks/v3-sdk":
version: 0.0.0-use.local
resolution: "@uniswap/v3-sdk@workspace:sdks/v3-sdk"
Expand Down Expand Up @@ -4836,19 +4791,6 @@ __metadata:
languageName: node
linkType: hard

"@uniswap/v4-sdk@npm:^1.10.3":
version: 1.10.3
resolution: "@uniswap/v4-sdk@npm:1.10.3"
dependencies:
"@ethersproject/solidity": ^5.0.9
"@uniswap/sdk-core": ^5.3.1
"@uniswap/v3-sdk": 3.12.0
tiny-invariant: ^1.1.0
tiny-warning: ^1.0.3
checksum: ca0565f4e87c2b306dc642ca13b7e2605a994cf5e9cb661503a60a3cc8dd86727f73328ebd529f9a42cedf6751dde91735b4ff7e3468deef37fa254d47e3ee9b
languageName: node
linkType: hard

"@uniswap/v4-sdk@npm:^1.12.0":
version: 1.12.0
resolution: "@uniswap/v4-sdk@npm:1.12.0"
Expand Down

0 comments on commit 1eede93

Please sign in to comment.