Skip to content

Commit

Permalink
Merge branch 'main' into v3-export-swap-logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilz authored May 30, 2024
2 parents 0a4f377 + f028944 commit 48faaef
Show file tree
Hide file tree
Showing 23 changed files with 101 additions and 103 deletions.
9 changes: 8 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
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(!):` will trigger a major version for a breaking change
- `feat(breaking):` will trigger a major version for a breaking change

## Description

Expand All @@ -15,6 +16,12 @@ _[Summary of the change, motivation, and context]_

_[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]_
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/monorepo-integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
- name: 👬🏽 Check for conflicting versions across the monorepo
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

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/push-branches-from-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,3 @@ jobs:
- name: ↗️ Push to beta
run: |
git push -u origin main:beta --force
- name: ↗️ Push to alpha
run: |
git push -u origin main:alpha --force
5 changes: 4 additions & 1 deletion .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Release

on:
workflow_dispatch:
push:
branches:
- main
- beta

jobs:
release:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Publishing of each SDK is done on merge to main using semantic-release and seman
- `fix(SDK name):` will trigger a patch version
- `<type>(public):` will trigger a patch version
- `feat(SDK name):` will trigger a minor version
- `feat(!):` will trigger a major version for a breaking change
- `feat(breaking):` will trigger a major version for a breaking change
```

Versions will only be generated based on the changelog of the relevant SDK's folder/files.
4 changes: 2 additions & 2 deletions publishing/release-rules.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = [
{ type: "feat", scope: "!", release: "major" },
{ type: "feat", scope: "breaking", release: "major" },
{ scope: "public", release: "patch" },
];
];
4 changes: 0 additions & 4 deletions sdks/permit2-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
{
"name": "main",
"prerelease": false
},
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
Expand Down
10 changes: 3 additions & 7 deletions sdks/router-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
},
"dependencies": {
"@ethersproject/abi": "^5.5.0",
"@uniswap/sdk-core": "^4.2.1-beta.1",
"@uniswap/sdk-core": "^5.0.0",
"@uniswap/swap-router-contracts": "^1.3.0",
"@uniswap/v2-sdk": "^4.3.1-beta.2",
"@uniswap/v3-sdk": "^3.11.1-beta.2"
"@uniswap/v2-sdk": "^4.3.2",
"@uniswap/v3-sdk": "^3.11.2"
},
"devDependencies": {
"@types/jest": "^24.0.25",
Expand All @@ -45,10 +45,6 @@
{
"name": "main",
"prerelease": false
},
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
Expand Down
4 changes: 0 additions & 4 deletions sdks/sdk-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
{
"name": "main",
"prerelease": false
},
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
Expand Down
13 changes: 7 additions & 6 deletions sdks/sdk-core/src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ChainAddresses = {
nonfungiblePositionManagerAddress?: string
tickLensAddress?: string
swapRouter02Address?: string
v1MixedRouteQuoterAddress?: string
mixedRouteQuoterV1Address?: string
}

const DEFAULT_NETWORKS = [ChainId.MAINNET, ChainId.GOERLI, ChainId.SEPOLIA]
Expand Down Expand Up @@ -75,11 +75,11 @@ const DEFAULT_ADDRESSES: ChainAddresses = {
}
const MAINNET_ADDRESSES: ChainAddresses = {
...DEFAULT_ADDRESSES,
v1MixedRouteQuoterAddress: '0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E',
mixedRouteQuoterV1Address: '0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E',
}
const GOERLI_ADDRESSES: ChainAddresses = {
...DEFAULT_ADDRESSES,
v1MixedRouteQuoterAddress: '0xBa60b6e6fF25488308789E6e0A65D838be34194e',
mixedRouteQuoterV1Address: '0xBa60b6e6fF25488308789E6e0A65D838be34194e',
}

const OPTIMISM_ADDRESSES: ChainAddresses = DEFAULT_ADDRESSES
Expand Down Expand Up @@ -183,6 +183,7 @@ const BASE_ADDRESSES: ChainAddresses = {
nonfungiblePositionManagerAddress: '0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1',
tickLensAddress: '0x0CdeE061c75D43c82520eD998C23ac2991c9ac6d',
swapRouter02Address: '0x2626664c2603336E57B271c5C0b26F421741e481',
mixedRouteQuoterV1Address: '0xe544efae946f0008ae9a8d64493efa7886b73776',
}

// Base Goerli v3 addresses
Expand Down Expand Up @@ -349,9 +350,9 @@ export const TICK_LENS_ADDRESSES: AddressMap = {
}

export const MIXED_ROUTE_QUOTER_V1_ADDRESSES: AddressMap = SUPPORTED_CHAINS.reduce<AddressMap>((memo, chainId) => {
const v1MixedRouteQuoterAddress = CHAIN_TO_ADDRESSES_MAP[chainId].v1MixedRouteQuoterAddress
if (v1MixedRouteQuoterAddress) {
memo[chainId] = v1MixedRouteQuoterAddress
const mixedRouteQuoterV1Address = CHAIN_TO_ADDRESSES_MAP[chainId].mixedRouteQuoterV1Address
if (mixedRouteQuoterV1Address) {
memo[chainId] = mixedRouteQuoterV1Address
}
return memo
}, {})
Expand Down
1 change: 1 addition & 0 deletions sdks/uniswapx-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,4 @@ Returns the domain, types, and values used to generate an EIP-712 signature over
**hash()**

Returns the order hash. This is used as a key to track order fulfillment on-chain. It may also be useful as a unique order identifier for off-chain purposes.

2 changes: 1 addition & 1 deletion sdks/uniswapx-sdk/abis/V2DutchOrderReactor.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 @@ -31,7 +31,7 @@
"@ethersproject/bytes": "^5.7.0",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@uniswap/sdk-core": "^4.2.1-beta.1",
"@uniswap/sdk-core": "^5.0.0",
"ethers": "^5.7.0",
"typechain": "^8.1.0"
}
Expand Down
8 changes: 4 additions & 4 deletions sdks/uniswapx-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"dependencies": {
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/providers": "^5.7.0",
"@uniswap/permit2-sdk": "^1.2.1-beta.1",
"@uniswap/sdk-core": "^4.2.1-beta.1",
"@uniswap/permit2-sdk": "^1.2.1",
"@uniswap/sdk-core": "^5.0.0",
"ethers": "^5.7.0"
},
"devDependencies": {
Expand Down Expand Up @@ -67,11 +67,11 @@
"extends": "semantic-release-monorepo",
"branches": [
{
"name": "main",
"name": "still-in-alpha",
"prerelease": false
},
{
"name": "alpha",
"name": "beta",
"prerelease": true
}
],
Expand Down
7 changes: 6 additions & 1 deletion sdks/uniswapx-sdk/src/constants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe("REACTOR_ADDRESS_MAPPING", () => {
Object {
"1": Object {
"Dutch": "0x6000da47483062A0D734Ba3dc7576Ce6A0B645C4",
"Dutch_V2": "0x3867393cC6EA7b0414C2c3e1D9fe7cEa987Fd066",
"Dutch_V2": "0x00000011F84B9aa48e5f8aA8B9897600006289Be",
"Relay": "0x0000000000A4e21E2597DCac987455c48b12edBF",
},
"11155111": Object {
Expand All @@ -24,6 +24,11 @@ describe("REACTOR_ADDRESS_MAPPING", () => {
"Dutch_V2": "0x0000000000000000000000000000000000000000",
"Relay": "0x0000000000A4e21E2597DCac987455c48b12edBF",
},
"42161": Object {
"Dutch": "0x0000000000000000000000000000000000000000",
"Dutch_V2": "0x1bd1aAdc9E230626C44a139d7E70d842749351eb",
"Relay": "0x0000000000000000000000000000000000000000",
},
"5": Object {
"Dutch": "0x6000da47483062A0D734Ba3dc7576Ce6A0B645C4",
"Dutch_V2": "0x0000000000000000000000000000000000000000",
Expand Down
10 changes: 9 additions & 1 deletion sdks/uniswapx-sdk/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,22 @@ export function constructSameAddressMap<T>(
export const PERMIT2_MAPPING: AddressMap = {
...constructSameAddressMap("0x000000000022d473030f116ddee9f6b43ac78ba3"),
11155111: "0x000000000022d473030f116ddee9f6b43ac78ba3",
42161: "0x000000000022d473030f116ddee9f6b43ac78ba3",
12341234: "0x000000000022d473030f116ddee9f6b43ac78ba3",
};

export const UNISWAPX_ORDER_QUOTER_MAPPING: AddressMap = {
...constructSameAddressMap("0x54539967a06Fc0E3C3ED0ee320Eb67362D13C5fF"),
11155111: "0xAA6187C48096e093c37d2cF178B1e8534A6934f7",
42161: "0x88440407634F89873c5D9439987Ac4BE9725fea8",
12341234: "0xbea0901A41177811b099F787D753436b2c47690E",
};

export const EXCLUSIVE_FILLER_VALIDATION_MAPPING: AddressMap = {
...constructSameAddressMap("0x8A66A74e15544db9688B68B06E116f5d19e5dF90"),
5: "0x0000000000000000000000000000000000000000",
11155111: "0x0000000000000000000000000000000000000000",
42161: "0x0000000000000000000000000000000000000000",
12341234: "0x8A66A74e15544db9688B68B06E116f5d19e5dF90",
};

Expand Down Expand Up @@ -68,7 +71,7 @@ export const REACTOR_ADDRESS_MAPPING: ReactorMapping = {
//test contract is only on mainnet
1: {
[OrderType.Dutch]: "0x6000da47483062A0D734Ba3dc7576Ce6A0B645C4",
[OrderType.Dutch_V2]: "0x3867393cC6EA7b0414C2c3e1D9fe7cEa987Fd066",
[OrderType.Dutch_V2]: "0x00000011F84B9aa48e5f8aA8B9897600006289Be",
[OrderType.Relay]: "0x0000000000A4e21E2597DCac987455c48b12edBF",
},
12341234: {
Expand All @@ -81,6 +84,11 @@ export const REACTOR_ADDRESS_MAPPING: ReactorMapping = {
[OrderType.Dutch]: "0xD6c073F2A3b676B8f9002b276B618e0d8bA84Fad",
[OrderType.Relay]: "0x0000000000A4e21E2597DCac987455c48b12edBF",
},
42161: {
[OrderType.Dutch_V2]: "0x1bd1aAdc9E230626C44a139d7E70d842749351eb",
[OrderType.Dutch]: "0x0000000000000000000000000000000000000000",
[OrderType.Relay]: "0x0000000000000000000000000000000000000000",
},
};

// aliasing for backwards compatibility
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdks/uniswapx-sdk/src/utils/order.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ describe("order utils", () => {

const ENCODED_DUTCH_V2_ORDER = new V2DutchOrderBuilder(
1,
"0x3867393cC6EA7b0414C2c3e1D9fe7cEa987Fd066"
"0x00000011F84B9aa48e5f8aA8B9897600006289Be"
)
.decayStartTime(TIMESTAMP_SECONDS)
.decayEndTime(TIMESTAMP_SECONDS)
Expand Down
14 changes: 5 additions & 9 deletions sdks/universal-router-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"test:hardhat": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' hardhat test"
},
"dependencies": {
"@uniswap/permit2-sdk": "^1.2.1-beta.1",
"@uniswap/router-sdk": "^1.9.1-beta.2",
"@uniswap/sdk-core": "^4.2.1-beta.1",
"@uniswap/permit2-sdk": "^1.2.1",
"@uniswap/router-sdk": "^1.9.2",
"@uniswap/sdk-core": "^5.0.0",
"@uniswap/universal-router": "1.6.0",
"@uniswap/v2-sdk": "^4.3.1-beta.2",
"@uniswap/v3-sdk": "^3.11.1-beta.2",
"@uniswap/v2-sdk": "^4.3.2",
"@uniswap/v3-sdk": "^3.11.2",
"bignumber.js": "^9.0.2",
"ethers": "^5.7.0"
},
Expand Down Expand Up @@ -70,10 +70,6 @@
{
"name": "main",
"prerelease": false
},
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
Expand Down
5 changes: 5 additions & 0 deletions sdks/universal-router-sdk/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ const CHAIN_CONFIGS: { [key: number]: ChainConfig } = {
weth: '0x4300000000000000000000000000000000000004',
creationBlock: 1116444,
},
[7777777]: {
router: '0x2986d9721A49838ab4297b695858aF7F17f38014',
weth: '0x4200000000000000000000000000000000000006',
creationBlock: 11832155,
},
}

export const UNIVERSAL_ROUTER_ADDRESS = (chainId: number): string => {
Expand Down
6 changes: 1 addition & 5 deletions sdks/v2-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@ethersproject/address": "^5.0.2",
"@ethersproject/solidity": "^5.0.9",
"@uniswap/sdk-core": "^4.2.1-beta.1",
"@uniswap/sdk-core": "^5.0.0",
"tiny-invariant": "^1.1.0",
"tiny-warning": "^1.0.3"
},
Expand All @@ -51,10 +51,6 @@
{
"name": "main",
"prerelease": false
},
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
Expand Down
6 changes: 1 addition & 5 deletions sdks/v3-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@ethersproject/abi": "^5.5.0",
"@ethersproject/solidity": "^5.0.9",
"@uniswap/sdk-core": "^4.2.1-beta.1",
"@uniswap/sdk-core": "^5.0.0",
"@uniswap/swap-router-contracts": "^1.3.0",
"@uniswap/v3-periphery": "^1.1.1",
"@uniswap/v3-staker": "1.0.0",
Expand Down Expand Up @@ -59,10 +59,6 @@
{
"name": "main",
"prerelease": false
},
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
Expand Down
Loading

0 comments on commit 48faaef

Please sign in to comment.