From b87e0517579438680441e4877b2c9046cc3b35e5 Mon Sep 17 00:00:00 2001 From: Danil Date: Fri, 2 Sep 2022 11:13:08 +0200 Subject: [PATCH] Remove sepolia (#2291) Signed-off-by: deniallugo Signed-off-by: deniallugo --- .github/workflows/setup.runtime.yml | 1 - contracts/hardhat.config.ts | 1 - core/lib/types/src/network.rs | 5 ----- core/tests/ts-tests/tests/tester/tester.ts | 2 +- sdk/zksync-rs/src/provider.rs | 1 - sdk/zksync.js/src/provider.ts | 10 ---------- sdk/zksync.js/src/rest-provider.ts | 2 -- sdk/zksync.js/src/types.ts | 6 +----- sdk/zksync.js/src/withdraw-helpers.ts | 1 - 9 files changed, 2 insertions(+), 27 deletions(-) diff --git a/.github/workflows/setup.runtime.yml b/.github/workflows/setup.runtime.yml index baa305e9d..e843f7688 100644 --- a/.github/workflows/setup.runtime.yml +++ b/.github/workflows/setup.runtime.yml @@ -79,7 +79,6 @@ jobs: "cluster": "stage" }, "^goerli$": { "cluster": "testnet-new" }, - "^sepolia$": { "cluster": "testnet-new" }, "^mainnet$": { "cluster": "mainnet", "hfEnv": "prod", "namespace": "zksync" } } - run: echo "::set-output name=short::$(git rev-parse --short HEAD)" diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 01eee40c1..59593c3c4 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -64,7 +64,6 @@ localConfig.EASY_EXODUS = process.env.CONTRACTS_TEST_EASY_EXODUS === 'true'; const contractDefs = { goerli: testnetConfig, - sepolia: testnetConfig, rinkeby: testnetConfig, ropsten: testnetConfig, mainnet: prodConfig, diff --git a/core/lib/types/src/network.rs b/core/lib/types/src/network.rs index bf52a0a5d..ccca847c4 100644 --- a/core/lib/types/src/network.rs +++ b/core/lib/types/src/network.rs @@ -22,8 +22,6 @@ pub enum Network { Rinkeby, /// Ethereum Goerli testnet. Goerli, - /// Ethereum Sepolia testnet. - Sepolia, /// Ethereum Ropsten testnet. Ropsten, /// Self-hosted Ethereum & zkSync networks. @@ -43,7 +41,6 @@ impl FromStr for Network { "rinkeby" => Self::Rinkeby, "ropsten" => Self::Ropsten, "goerli" => Self::Goerli, - "sepolia" => Self::Sepolia, "localhost" => Self::Localhost, "test" => Self::Test, another => return Err(another.to_owned()), @@ -59,7 +56,6 @@ impl fmt::Display for Network { Self::Ropsten => write!(f, "ropsten"), Self::Localhost => write!(f, "localhost"), Self::Goerli => write!(f, "goerli"), - Self::Sepolia => write!(f, "sepolia"), Self::Unknown => write!(f, "unknown"), Self::Test => write!(f, "test"), } @@ -74,7 +70,6 @@ impl Network { Network::Ropsten => 3, Network::Rinkeby => 4, Network::Goerli => 5, - Network::Sepolia => 11155111, Network::Localhost => 9, Network::Unknown => panic!("Unknown chain ID"), Network::Test => panic!("Test chain ID"), diff --git a/core/tests/ts-tests/tests/tester/tester.ts b/core/tests/ts-tests/tests/tester/tester.ts index 8defc2e75..8013dbe80 100644 --- a/core/tests/ts-tests/tests/tester/tester.ts +++ b/core/tests/ts-tests/tests/tester/tester.ts @@ -7,7 +7,7 @@ import * as crypto from 'crypto'; const zksyncAbi = require('../../../../../contracts/artifacts/cache/solpp-generated-contracts/ZkSync.sol/ZkSync.json').abi; -type Network = 'localhost' | 'goerli' | 'sepolia'; +type Network = 'localhost' | 'goerli'; const testConfigPath = path.join(process.env.ZKSYNC_HOME as string, `etc/test_config/constant`); const ethTestConfig = JSON.parse(fs.readFileSync(`${testConfigPath}/eth.json`, { encoding: 'utf-8' })); diff --git a/sdk/zksync-rs/src/provider.rs b/sdk/zksync-rs/src/provider.rs index ffae177a8..229d12d5f 100644 --- a/sdk/zksync-rs/src/provider.rs +++ b/sdk/zksync-rs/src/provider.rs @@ -30,7 +30,6 @@ pub fn get_rpc_addr(network: Network) -> &'static str { Network::Unknown => panic!("Attempt to create a provider from an unknown network"), Network::Test => panic!("Attempt to create a provider from an test network"), Network::Goerli => "https://goerli-api.zksync.io/jsrpc", - Network::Sepolia => "https://sepolia-api.zksync.io/jsrpc", } } diff --git a/sdk/zksync.js/src/provider.ts b/sdk/zksync.js/src/provider.ts index 89ec93ec9..e7365999c 100644 --- a/sdk/zksync.js/src/provider.ts +++ b/sdk/zksync.js/src/provider.ts @@ -50,16 +50,6 @@ export async function getDefaultProvider( } else if (transport === 'HTTP') { return await Provider.newHttpProvider('https://goerli-api.zksync.io/jsrpc', pollIntervalMilliSecs, network); } - } else if (network === 'sepolia') { - if (transport === 'WS') { - return await Provider.newWebsocketProvider('wss://sepolia-api.zksync.io/jsrpc-ws', network); - } else if (transport === 'HTTP') { - return await Provider.newHttpProvider( - 'https://sepolia-api.zksync.io/jsrpc', - pollIntervalMilliSecs, - network - ); - } } else if (network === 'goerli-beta') { if (transport === 'WS') { return await Provider.newWebsocketProvider('wss://goerli-beta-api.zksync.dev/jsrpc-ws', network); diff --git a/sdk/zksync.js/src/rest-provider.ts b/sdk/zksync.js/src/rest-provider.ts index 820413ba0..1220b6c7d 100644 --- a/sdk/zksync.js/src/rest-provider.ts +++ b/sdk/zksync.js/src/rest-provider.ts @@ -13,8 +13,6 @@ export async function getDefaultRestProvider( return await RestProvider.newProvider('http://127.0.0.1:3001/api/v0.2', pollIntervalMilliSecs, network); } else if (network === 'goerli') { return await RestProvider.newProvider('https://goerli-api.zksync.io/api/v0.2', pollIntervalMilliSecs, network); - } else if (network === 'sepolia') { - return await RestProvider.newProvider('https://sepolia-api.zksync.io/api/v0.2', pollIntervalMilliSecs, network); } else if (network === 'goerli-beta') { return await RestProvider.newProvider( 'https://goerli-beta-api.zksync.dev/api/v0.2', diff --git a/sdk/zksync.js/src/types.ts b/sdk/zksync.js/src/types.ts index afd14ab12..8d3eba92b 100644 --- a/sdk/zksync.js/src/types.ts +++ b/sdk/zksync.js/src/types.ts @@ -16,10 +16,9 @@ export type TotalFee = Map; export type Nonce = number | 'committed'; -export type Network = 'localhost' | 'sepolia' | 'goerli' | 'mainnet' | 'rinkeby-beta' | 'goerli-beta'; +export type Network = 'localhost' | 'goerli' | 'mainnet' | 'rinkeby-beta' | 'goerli-beta'; const MAINNET_NETWORK_CHAIN_ID = 1; -const SEPOLIA_NETWORK_CHAIN_ID = 11155111; const RINKEBY_NETWORK_CHAIN_ID = 4; const GOERLI_NETWORK_CHAIN_ID = 5; const LOCALHOST_NETWORK_CHAIN_ID = 9; @@ -31,9 +30,6 @@ export function l1ChainId(network?: Network): number { if (network === 'goerli' || network === 'goerli-beta') { return GOERLI_NETWORK_CHAIN_ID; } - if (network === 'sepolia') { - return SEPOLIA_NETWORK_CHAIN_ID; - } if (network === 'mainnet') { return MAINNET_NETWORK_CHAIN_ID; } diff --git a/sdk/zksync.js/src/withdraw-helpers.ts b/sdk/zksync.js/src/withdraw-helpers.ts index 7c0913d56..8781c9c7c 100644 --- a/sdk/zksync.js/src/withdraw-helpers.ts +++ b/sdk/zksync.js/src/withdraw-helpers.ts @@ -31,7 +31,6 @@ function checkEthProvider(ethersWallet: ethers.Signer) { // https://github.com/makerdao/multicall function getMulticallAddressByNetwork(network: Network) { switch (network) { - case 'sepolia': case 'rinkeby-beta': return '0x42ad527de7d4e9d9d011ac45b31d8551f8fe9821'; case 'goerli':