Skip to content

Commit

Permalink
feat(universal-router-sdk): support worldchain on universal-router-sdk (
Browse files Browse the repository at this point in the history
#132)

## Description

Support worldchain on universal router sdk

## How Has This Been Tested?

Will test in routing

## Are there any breaking changes?

No

## (Optional) Feedback Focus


## (Optional) Follow Ups
  • Loading branch information
jsy1218 authored Oct 1, 2024
1 parent b14baf6 commit 0e25d35
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 17 deletions.
8 changes: 4 additions & 4 deletions sdks/universal-router-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"dependencies": {
"@openzeppelin/contracts": "4.7.0",
"@uniswap/permit2-sdk": "^1.3.0",
"@uniswap/router-sdk": "^1.12.1",
"@uniswap/sdk-core": "^5.3.1",
"@uniswap/router-sdk": "^1.13.0",
"@uniswap/sdk-core": "^5.6.0",
"@uniswap/universal-router": "2.0.0-beta.1",
"@uniswap/v2-core": "^1.0.1",
"@uniswap/v2-sdk": "^4.4.1",
"@uniswap/v2-sdk": "^4.5.0",
"@uniswap/v3-core": "1.0.0",
"@uniswap/v3-sdk": "^3.13.1",
"@uniswap/v3-sdk": "^3.16.0",
"@uniswap/v4-sdk": "^1.6.3",
"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 @@ -268,6 +268,19 @@ export const CHAIN_CONFIGS: { [key: number]: ChainConfig } = {
},
},
},
[480]: {
weth: '0x4200000000000000000000000000000000000006',
routerConfigs: {
[UniversalRouterVersion.V1_2]: {
address: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
creationBlock: 4063979,
},
[UniversalRouterVersion.V2_0]: {
address: '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D',
creationBlock: 4063979,
},
},
},
}

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

"@uniswap/router-sdk@npm:^1.12.1":
version: 1.12.1
resolution: "@uniswap/router-sdk@npm:1.12.1"
"@uniswap/router-sdk@npm:^1.13.0":
version: 1.13.0
resolution: "@uniswap/router-sdk@npm:1.13.0"
dependencies:
"@ethersproject/abi": ^5.5.0
"@uniswap/sdk-core": ^5.3.1
"@uniswap/sdk-core": ^5.6.0
"@uniswap/swap-router-contracts": ^1.3.0
"@uniswap/v2-sdk": ^4.3.2
"@uniswap/v3-sdk": ^3.11.2
"@uniswap/v2-sdk": ^4.5.0
"@uniswap/v3-sdk": ^3.16.0
"@uniswap/v4-sdk": ^1.6.0
checksum: d97732822cdd062349a42762c9c4c458e156bdcf436fc9ba8ee3a7fb4e2ade803a6b6305b4a59e869073436dd510ad0d229ec58aa56dddff60a3f06d3670a84c
checksum: 0cda4642e1039363cb66959a7dadb530b6696b7038891befc47715cdad332c333666a4bf4c6bf48418a40c341c17f065509117c987fc05a8ed3f4d56490d7fc8
languageName: node
linkType: hard

Expand Down Expand Up @@ -4730,13 +4730,13 @@ __metadata:
"@types/node": ^18.7.16
"@types/node-fetch": ^2.6.2
"@uniswap/permit2-sdk": ^1.3.0
"@uniswap/router-sdk": ^1.12.1
"@uniswap/sdk-core": ^5.3.1
"@uniswap/router-sdk": ^1.13.0
"@uniswap/sdk-core": ^5.6.0
"@uniswap/universal-router": 2.0.0-beta.1
"@uniswap/v2-core": ^1.0.1
"@uniswap/v2-sdk": ^4.4.1
"@uniswap/v2-sdk": ^4.5.0
"@uniswap/v3-core": 1.0.0
"@uniswap/v3-sdk": ^3.13.1
"@uniswap/v3-sdk": ^3.16.0
"@uniswap/v4-sdk": ^1.6.3
bignumber.js: ^9.0.2
chai: ^4.3.6
Expand Down Expand Up @@ -4771,7 +4771,7 @@ __metadata:
languageName: node
linkType: hard

"@uniswap/v2-sdk@npm:^4.3.2, @uniswap/v2-sdk@npm:^4.4.1, @uniswap/v2-sdk@npm:^4.5.0":
"@uniswap/v2-sdk@npm:^4.5.0":
version: 4.5.0
resolution: "@uniswap/v2-sdk@npm:4.5.0"
dependencies:
Expand Down Expand Up @@ -4844,7 +4844,7 @@ __metadata:
languageName: node
linkType: hard

"@uniswap/v3-sdk@npm:^3.11.2, @uniswap/v3-sdk@npm:^3.13.1, @uniswap/v3-sdk@npm:^3.16.0":
"@uniswap/v3-sdk@npm:^3.16.0":
version: 3.16.0
resolution: "@uniswap/v3-sdk@npm:3.16.0"
dependencies:
Expand Down

0 comments on commit 0e25d35

Please sign in to comment.