Skip to content

Commit

Permalink
Merge branch 'main' into trade-route
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilz authored Nov 27, 2024
2 parents e093db4 + a3fce42 commit c561bde
Show file tree
Hide file tree
Showing 53 changed files with 5,942 additions and 725 deletions.
8 changes: 4 additions & 4 deletions sdks/router-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
},
"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"
"@uniswap/v2-sdk": "^4.7.0",
"@uniswap/v3-sdk": "^3.19.0",
"@uniswap/v4-sdk": "^1.12.0"
},
"devDependencies": {
"@types/jest": "^24.0.25",
Expand Down
21 changes: 17 additions & 4 deletions sdks/sdk-core/src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export const V2_FACTORY_ADDRESSES: AddressMap = {
[ChainId.CELO]: '0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f',
[ChainId.BLAST]: '0x5C346464d33F90bABaf70dB6388507CC889C1070',
[ChainId.WORLDCHAIN]: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f',
[ChainId.ASTROCHAIN_SEPOLIA]: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f',
[ChainId.UNICHAIN_SEPOLIA]: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f',
[ChainId.UNICHAIN]: '0x1f98400000000000000000000000000000000002',
}
/**
* @deprecated use V2_ROUTER_ADDRESSES instead
Expand All @@ -74,7 +75,8 @@ export const V2_ROUTER_ADDRESSES: AddressMap = {
[ChainId.POLYGON]: '0xedf6066a2b290c185783862c7f4776a2c8077ad1',
[ChainId.BLAST]: '0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035',
[ChainId.WORLDCHAIN]: '0x541aB7c31A119441eF3575F6973277DE0eF460bd',
[ChainId.ASTROCHAIN_SEPOLIA]: '0x920b806E40A00E02E7D2b94fFc89860fDaEd3640',
[ChainId.UNICHAIN_SEPOLIA]: '0x920b806E40A00E02E7D2b94fFc89860fDaEd3640',
[ChainId.UNICHAIN]: '0x284f11109359a7e1306c3e447ef14d38400063ff',
}

// Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum, Polygon
Expand Down Expand Up @@ -277,7 +279,7 @@ const WORLDCHAIN_ADDRESSES: ChainAddresses = {
swapRouter02Address: '0x091AD9e2e6e5eD44c1c66dB50e49A601F9f36cF6',
}

const ASTROCHAIN_SEPOLIA_ADDRESSES: ChainAddresses = {
const UNICHAIN_SEPOLIA_ADDRESSES: ChainAddresses = {
v3CoreFactoryAddress: '0x1F98431c8aD98523631AE4a59f267346ea31F984',
multicallAddress: '0x9D0F15f2cf58655fDDcD1EE6129C547fDaeD01b1',
quoterAddress: '0x6Dd37329A1A225a6Fca658265D460423DCafBF89',
Expand All @@ -292,6 +294,16 @@ const ASTROCHAIN_SEPOLIA_ADDRESSES: ChainAddresses = {
v4QuoterAddress: '0x2cfa87651D3AB05Bc59E325E5eaC8495CF34cE55',
}

const UNICHAIN_ADDRESSES: ChainAddresses = {
v3CoreFactoryAddress: '0x1f98400000000000000000000000000000000003',
multicallAddress: '0xb7610f9b733e7d45184be3a1bc966960ccc54f0b',
quoterAddress: '0x565ac8c7863d9bb16d07e809ff49fe5cd467634c',
v3MigratorAddress: '0xb9d0c246f306b1aaf02ae6ba112d5ef25e5b60dc',
nonfungiblePositionManagerAddress: '0x943e6e07a7e8e791dafc44083e54041d743c46e9',
tickLensAddress: '0xd5d76fa166ab8d8ad4c9f61aaa81457b66cbe443',
swapRouter02Address: '0x73855d06de49d0fe4a9c42636ba96c62da12ff9c',
}

export const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses> = {
[ChainId.MAINNET]: MAINNET_ADDRESSES,
[ChainId.OPTIMISM]: OPTIMISM_ADDRESSES,
Expand All @@ -316,7 +328,8 @@ export const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses>
[ChainId.BLAST]: BLAST_ADDRESSES,
[ChainId.ZKSYNC]: ZKSYNC_ADDRESSES,
[ChainId.WORLDCHAIN]: WORLDCHAIN_ADDRESSES,
[ChainId.ASTROCHAIN_SEPOLIA]: ASTROCHAIN_SEPOLIA_ADDRESSES,
[ChainId.UNICHAIN_SEPOLIA]: UNICHAIN_SEPOLIA_ADDRESSES,
[ChainId.UNICHAIN]: UNICHAIN_ADDRESSES,
}

/* V3 Contract Addresses */
Expand Down
6 changes: 4 additions & 2 deletions sdks/sdk-core/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export enum ChainId {
BLAST = 81457,
ZKSYNC = 324,
WORLDCHAIN = 480,
ASTROCHAIN_SEPOLIA = 1301,
UNICHAIN_SEPOLIA = 1301,
UNICHAIN = 130,
}

export const SUPPORTED_CHAINS = [
Expand All @@ -51,7 +52,8 @@ export const SUPPORTED_CHAINS = [
ChainId.BLAST,
ChainId.ZKSYNC,
ChainId.WORLDCHAIN,
ChainId.ASTROCHAIN_SEPOLIA,
ChainId.UNICHAIN_SEPOLIA,
ChainId.UNICHAIN,
] as const
export type SupportedChainsType = (typeof SUPPORTED_CHAINS)[number]

Expand Down
1 change: 1 addition & 0 deletions sdks/sdk-core/src/entities/weth9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ export const WETH9: { [chainId: number]: Token } = {
324: new Token(324, '0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91', 18, 'WETH', 'Wrapped Ether'),
480: new Token(480, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
1301: new Token(1301, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
130: new Token(130, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
}
1 change: 1 addition & 0 deletions sdks/uniswapx-sdk/abis/V3DutchOrderReactor.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdks/uniswapx-sdk/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@types/mocha": "^9.1.1",
"@types/node": "^18.7.16",
"chai": "^4.3.6",
"hardhat": "^2.14.0",
"hardhat": "^2.22.15",
"husky": "^8.0.3",
"ts-node": "^10.9.1",
"tsdx": "^0.14.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ describe("RelayOrderValidator", () => {
blockTimestamp = (await ethers.provider.getBlock("latest")).timestamp;
});

it("quotes a valid order", async () => {
// TODO @ericzhong @allanwu - fix this test
it.skip("quotes a valid order", async () => {
const deadline = blockTimestamp + 1000
const order = builder
.deadline(deadline)
Expand Down
Loading

0 comments on commit c561bde

Please sign in to comment.