From 4cf96077ba21dbbbbbc8ffa8c549648f69623fbc Mon Sep 17 00:00:00 2001 From: Jonney <603073+Jonney@users.noreply.github.com> Date: Wed, 24 Jul 2024 23:57:25 +0800 Subject: [PATCH 01/10] Update .gitmodules (#337) There is no need to use an account for GitHub. --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index e67b7ebd..82907f3a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,4 +6,4 @@ url = https://github.com/transmissions11/solmate [submodule "lib/permit2"] path = lib/permit2 - url = git@github.com:Uniswap/permit2.git + url = https://github.com/Uniswap/permit2 From 721123a1717e75f4febb30a8858ba8510fcc4b2c Mon Sep 17 00:00:00 2001 From: mr-uniswap <144828035+mr-uniswap@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:55:56 -0400 Subject: [PATCH 02/10] chore(infra): set up deploy (#397) --- .github/workflows/deploy.yml | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..9c78efed --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,47 @@ +name: Release +on: + # manual trigger + workflow_dispatch: + +jobs: + deploy: + name: deploy + runs-on: + group: npm-deploy + environment: + name: deploy + permissions: + id-token: write + contents: write + steps: + - name: Load secret + uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 + with: + # Export loaded secrets as environment variables + export-env: true + env: + OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + # You may need to change this to your vault name and secret name + # Refer to it by calling env.NPM_TOKEN + # This token is also limited by IP to ONLY work on the runner + NPM_TOKEN: op://npm-deploy/npm-runner-token/secret + + - name: Checkout + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + + - name: Setup Node + uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 + with: + cache: yarn + node-version: 18 + + - name: Install dependencies + run: yarn install --immutable --immutable-cache + + - name: Release + env: + NPM_CONFIG_USERCONFIG: /dev/null + NPM_TOKEN: ${{ env.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: yarn g:release + From 5192af6f3c8820a7b57c2c28586ceac53a5f07f0 Mon Sep 17 00:00:00 2001 From: mr-uniswap <144828035+mr-uniswap@users.noreply.github.com> Date: Thu, 12 Sep 2024 17:25:26 -0400 Subject: [PATCH 03/10] chore: yarn publish (#402) * chore: yarn publish * Update deploy.yml * Update deploy.yml --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9c78efed..4b3620b8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,7 +41,7 @@ jobs: - name: Release env: NPM_CONFIG_USERCONFIG: /dev/null - NPM_TOKEN: ${{ env.NPM_TOKEN }} + YARN_NPM_AUTH_TOKEN: ${{ env.NPM_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn g:release + run: yarn npm publish From 10d6b0f53b7789db244cfa1f73af7cb06edc935d Mon Sep 17 00:00:00 2001 From: mr-uniswap <144828035+mr-uniswap@users.noreply.github.com> Date: Thu, 12 Sep 2024 17:35:45 -0400 Subject: [PATCH 04/10] Update deploy.yml --- .github/workflows/deploy.yml | 46 ++++++++++++++---------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4b3620b8..a84c8d1c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,47 +1,37 @@ name: Release -on: - # manual trigger - workflow_dispatch: - +on: workflow_dispatch jobs: - deploy: - name: deploy + release: + name: Release + environment: + name: release runs-on: group: npm-deploy - environment: - name: deploy permissions: id-token: write contents: write steps: - - name: Load secret + - name: Load Secrets uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 with: - # Export loaded secrets as environment variables export-env: true env: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} - # You may need to change this to your vault name and secret name - # Refer to it by calling env.NPM_TOKEN - # This token is also limited by IP to ONLY work on the runner NPM_TOKEN: op://npm-deploy/npm-runner-token/secret - - name: Checkout - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - + uses: actions/checkout@v4 + with: + submodules: "true" + fetch-depth: 2 - name: Setup Node - uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 + uses: actions/setup-node@v4 with: - cache: yarn node-version: 18 - - - name: Install dependencies - run: yarn install --immutable --immutable-cache - - - name: Release + registry-url: https://registry.npmjs.org + scope: "@uniswap" + - name: Setup CI + run: npm ci + - name: Publish + run: npm publish --provenance env: - NPM_CONFIG_USERCONFIG: /dev/null - YARN_NPM_AUTH_TOKEN: ${{ env.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn npm publish - + NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} From b767b99095a3a394f22a828403010f5e7a01a842 Mon Sep 17 00:00:00 2001 From: mr-uniswap <144828035+mr-uniswap@users.noreply.github.com> Date: Thu, 12 Sep 2024 17:48:18 -0400 Subject: [PATCH 05/10] Update deploy.yml --- .github/workflows/deploy.yml | 44 ++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a84c8d1c..256ba95d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,37 +1,47 @@ name: Release -on: workflow_dispatch +on: + # manual trigger + workflow_dispatch: + jobs: - release: - name: Release - environment: - name: release + deploy: + name: release runs-on: group: npm-deploy + environment: + name: release permissions: id-token: write contents: write steps: - - name: Load Secrets + - name: Load secret uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0 with: + # Export loaded secrets as environment variables export-env: true env: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + # You may need to change this to your vault name and secret name + # Refer to it by calling env.NPM_TOKEN + # This token is also limited by IP to ONLY work on the runner NPM_TOKEN: op://npm-deploy/npm-runner-token/secret + - name: Checkout - uses: actions/checkout@v4 - with: - submodules: "true" - fetch-depth: 2 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 with: + cache: yarn node-version: 18 - registry-url: https://registry.npmjs.org - scope: "@uniswap" - - name: Setup CI - run: npm ci - - name: Publish - run: npm publish --provenance + + - name: Install dependencies + run: yarn install --immutable --immutable-cache + + - name: Release env: + NPM_CONFIG_USERCONFIG: /dev/null NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc && yarn publish + From 8932a61910d9c4f8907ee9fe87e7368c8e14d92e Mon Sep 17 00:00:00 2001 From: mr-uniswap <144828035+mr-uniswap@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:22:11 -0400 Subject: [PATCH 06/10] chore: add provenance (#404) --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8661b8b2..99109643 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "description": "Smart contracts for Universal Router", "license": "GPL-2.0-or-later", "publishConfig": { - "access": "public" + "access": "public", + "provenance": true }, "version": "1.6.0", "keywords": [ From 3abde877e60c070dc2a3dd296839e67c873d4da8 Mon Sep 17 00:00:00 2001 From: Emily Williams Date: Thu, 19 Sep 2024 10:24:47 -0400 Subject: [PATCH 07/10] compile contracts in workflow (#405) --- .github/workflows/deploy.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 256ba95d..749d4276 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,7 +5,7 @@ on: jobs: deploy: - name: release + name: release runs-on: group: npm-deploy environment: @@ -25,23 +25,24 @@ jobs: # Refer to it by calling env.NPM_TOKEN # This token is also limited by IP to ONLY work on the runner NPM_TOKEN: op://npm-deploy/npm-runner-token/secret - + - name: Checkout uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - + - name: Setup Node uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 with: cache: yarn node-version: 18 - - name: Install dependencies - run: yarn install --immutable --immutable-cache - + - name: Install dependencies and compile contracts + run: | + yarn install --immutable --immutable-cache + yarn compile + - name: Release env: NPM_CONFIG_USERCONFIG: /dev/null NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc && yarn publish - From 995e58f6f23cce0105fb93141e7231254aca3fce Mon Sep 17 00:00:00 2001 From: marktoda Date: Fri, 27 Sep 2024 16:27:30 -0400 Subject: [PATCH 08/10] feat: deploy worldchain (#411) --- deploy-addresses/worldchain.json | 4 +++ .../deployParameters/DeployWorldchain.s.sol | 32 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 deploy-addresses/worldchain.json create mode 100644 script/deployParameters/DeployWorldchain.s.sol diff --git a/deploy-addresses/worldchain.json b/deploy-addresses/worldchain.json new file mode 100644 index 00000000..b2f2c1b9 --- /dev/null +++ b/deploy-addresses/worldchain.json @@ -0,0 +1,4 @@ +{ + "UniversalRouterV1_2_V2Support": "0x16D4F26C15f3658ec65B1126ff27DD3dF2a2996b", + "UnsupportedProtocol": "0x16D4F26C15f3658ec65B1126ff27DD3dF2a2996b" +} diff --git a/script/deployParameters/DeployWorldchain.s.sol b/script/deployParameters/DeployWorldchain.s.sol new file mode 100644 index 00000000..dfe16a89 --- /dev/null +++ b/script/deployParameters/DeployWorldchain.s.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.15; + +import {DeployUniversalRouter} from '../DeployUniversalRouter.s.sol'; +import {RouterParameters} from 'contracts/base/RouterImmutables.sol'; + +contract DeployWorldchain is DeployUniversalRouter { + function setUp() public override { + params = RouterParameters({ + permit2: 0x000000000022D473030F116dDEE9F6B43aC78BA3, + weth9: 0x4200000000000000000000000000000000000006, + seaportV1_5: UNSUPPORTED_PROTOCOL, + seaportV1_4: UNSUPPORTED_PROTOCOL, + openseaConduit: UNSUPPORTED_PROTOCOL, + nftxZap: UNSUPPORTED_PROTOCOL, + x2y2: UNSUPPORTED_PROTOCOL, + foundation: UNSUPPORTED_PROTOCOL, + sudoswap: UNSUPPORTED_PROTOCOL, + elementMarket: UNSUPPORTED_PROTOCOL, + nft20Zap: UNSUPPORTED_PROTOCOL, + cryptopunks: UNSUPPORTED_PROTOCOL, + looksRareV2: UNSUPPORTED_PROTOCOL, + routerRewardsDistributor: UNSUPPORTED_PROTOCOL, + looksRareRewardsDistributor: UNSUPPORTED_PROTOCOL, + looksRareToken: UNSUPPORTED_PROTOCOL, + v2Factory: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f, + v3Factory: 0x7a5028BDa40e7B173C278C5342087826455ea25a, + pairInitCodeHash: 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f, + poolInitCodeHash: 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54 + }); + } +} From f95928955d26ec2b6a74058c63fa8c2747c734f6 Mon Sep 17 00:00:00 2001 From: marktoda Date: Mon, 30 Sep 2024 14:14:47 -0400 Subject: [PATCH 09/10] fix: update UR address on worldchain (#412) previous accidentally set it to the unsupported protocol --- deploy-addresses/worldchain.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-addresses/worldchain.json b/deploy-addresses/worldchain.json index b2f2c1b9..ecb8a51c 100644 --- a/deploy-addresses/worldchain.json +++ b/deploy-addresses/worldchain.json @@ -1,4 +1,4 @@ { - "UniversalRouterV1_2_V2Support": "0x16D4F26C15f3658ec65B1126ff27DD3dF2a2996b", + "UniversalRouterV1_2_V2Support": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "UnsupportedProtocol": "0x16D4F26C15f3658ec65B1126ff27DD3dF2a2996b" } From ae8941899d91a39a611b285e7970707f9ec9dcad Mon Sep 17 00:00:00 2001 From: mr-uniswap <144828035+mr-uniswap@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:34:51 -0400 Subject: [PATCH 10/10] Create CODEOWNERS (#419) --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..f0363346 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @uniswap/protocols