From 652d4226229c97895ae9350bbf276370ebb38c5e Mon Sep 17 00:00:00 2001 From: Kyu Date: Wed, 15 Nov 2023 15:24:11 -0800 Subject: [PATCH] Add Sepoia addresses (#761) --- contracts/zero-ex/CHANGELOG.json | 8 +++++++ .../bridges/AbstractBridgeAdapter.sol | 6 +++-- packages/contract-addresses/CHANGELOG.json | 8 +++++++ packages/contract-addresses/addresses.json | 23 +++++++++++++++++++ packages/contract-addresses/src/index.ts | 1 + 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/contracts/zero-ex/CHANGELOG.json b/contracts/zero-ex/CHANGELOG.json index a3d4e3c4cd..be02ec3974 100644 --- a/contracts/zero-ex/CHANGELOG.json +++ b/contracts/zero-ex/CHANGELOG.json @@ -1,4 +1,12 @@ [ + { + "version": "0.49.0", + "changes": [ + { + "note": "Allowlist Sepolia in AbstractBridgeAdapter" + } + ] + }, { "version": "0.48.0", "changes": [ diff --git a/contracts/zero-ex/contracts/src/transformers/bridges/AbstractBridgeAdapter.sol b/contracts/zero-ex/contracts/src/transformers/bridges/AbstractBridgeAdapter.sol index bfe22ce66d..412af436a8 100644 --- a/contracts/zero-ex/contracts/src/transformers/bridges/AbstractBridgeAdapter.sol +++ b/contracts/zero-ex/contracts/src/transformers/bridges/AbstractBridgeAdapter.sol @@ -23,12 +23,14 @@ abstract contract AbstractBridgeAdapter is IBridgeAdapter { assembly { chainId := chainid() } - // Skip chain id validation on Ganache (1337), Anvil (31337), Goerli (5), Mumbai (80001), Base Goerli (84531) + // Skip chain id validation on Ganache (1337), Anvil (31337), Goerli (5), Mumbai (80001), Base Goerli (84531), + // Sepolia (11155111) bool skipValidation = (chainId == 1337 || chainId == 31337 || chainId == 5 || chainId == 80001 || - chainId == 84531); + chainId == 84531 || + chainId == 11155111); if (chainId != expectedChainId && !skipValidation) { revert(string(abi.encodePacked(expectedChainName, "BridgeAdapter.constructor: wrong chain ID"))); diff --git a/packages/contract-addresses/CHANGELOG.json b/packages/contract-addresses/CHANGELOG.json index 1d43102d58..d182cc28c9 100644 --- a/packages/contract-addresses/CHANGELOG.json +++ b/packages/contract-addresses/CHANGELOG.json @@ -1,4 +1,12 @@ [ + { + "version": "8.13.0", + "changes": [ + { + "note": "Add Sepolia addresses" + } + ] + }, { "version": "8.12.0", "changes": [ diff --git a/packages/contract-addresses/addresses.json b/packages/contract-addresses/addresses.json index 2f03d6f541..75777ca4b3 100644 --- a/packages/contract-addresses/addresses.json +++ b/packages/contract-addresses/addresses.json @@ -274,5 +274,28 @@ "fillQuoteTransformer": "0x2c46d57bb5af87a13a51dd5b62ba7d3bc7e12e9c", "positiveSlippageFeeTransformer": "0xf98a130d3b4029c70e6d93098cb82a003421341e" } + }, + "11155111": { + "zrxToken": "0x0000000000000000000000000000000000000000", + "etherToken": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14", + "zeroExGovernor": "0x5c1f7772ce24d942b85e9b6576f7b5ef70686f5a", + "zrxVault": "0x0000000000000000000000000000000000000000", + "staking": "0x0000000000000000000000000000000000000000", + "stakingProxy": "0x0000000000000000000000000000000000000000", + "erc20BridgeProxy": "0x0000000000000000000000000000000000000000", + "erc20BridgeSampler": "0x0000000000000000000000000000000000000000", + "exchangeProxyGovernor": "0x5c1f7772ce24d942b85e9b6576f7b5ef70686f5a", + "exchangeProxy": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", + "exchangeProxyTransformerDeployer": "0x58bca53ebba1aaf25f0edcd8dad6421872fe20b2", + "exchangeProxyFlashWallet": "0xdb6f1920a889355780af7570773609bd8cb1f498", + "exchangeProxyLiquidityProviderSandbox": "0x0000000000000000000000000000000000000000", + "zrxTreasury": "0x0000000000000000000000000000000000000000", + "transformers": { + "wethTransformer": "0xf98a130d3b4029c70e6d93098cb82a003421341e", + "payTakerTransformer": "0x44e0f3975e95387f3866dd7cab1f51050394a3d1", + "affiliateFeeTransformer": "0x5cc22a0e06ea11097c612a962e63674b90e96099", + "fillQuoteTransformer": "0x63186ea36e78ecbf0128e448362f1b81e9bf7412", + "positiveSlippageFeeTransformer": "0x9e52d8b32d835206d09810c310593bcc77264066" + } } } diff --git a/packages/contract-addresses/src/index.ts b/packages/contract-addresses/src/index.ts index 4a7a5c32f3..7f6cc95338 100644 --- a/packages/contract-addresses/src/index.ts +++ b/packages/contract-addresses/src/index.ts @@ -37,6 +37,7 @@ export enum ChainId { Avalanche = 43114, Celo = 42220, PolygonMumbai = 80001, + Sepolia = 11155111 } /**