Skip to content

Commit

Permalink
fix: remove short name param from network config
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Dec 20, 2023
1 parent 5bc2dec commit 4313fe8
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 31 deletions.
7 changes: 0 additions & 7 deletions data/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export type ZkSyncNetwork = {
id: number;
key: string;
name: string;
shortName: string;
rpcUrl: string;
hidden?: boolean; // If set to true, the network will not be shown in the network selector
l1Network?: L1Network;
Expand All @@ -48,7 +47,6 @@ export const inMemoryNode: ZkSyncNetwork = {
id: 260,
key: "in-memory-node",
name: "In-memory node",
shortName: "In-memory local node",
rpcUrl: "http://localhost:8011",
};

Expand All @@ -57,7 +55,6 @@ export const dockerizedNode: ZkSyncNetwork = {
id: 270,
key: "dockerized-node",
name: "Dockerized local node",
shortName: "Dockerized node",
rpcUrl: "http://localhost:3050",
l1Network: {
id: 9,
Expand All @@ -76,7 +73,6 @@ export const zkSyncNetworks: ZkSyncNetwork[] = [
id: 324,
key: "mainnet",
name: "zkSync",
shortName: "zkSync",
rpcUrl: "https://mainnet.era.zksync.io",
blockExplorerUrl: "https://explorer.zksync.io",
blockExplorerApi: "https://block-explorer-api.mainnet.zksync.io",
Expand All @@ -89,7 +85,6 @@ export const zkSyncNetworks: ZkSyncNetwork[] = [
id: 300,
key: "sepolia",
name: "zkSync Sepolia Testnet",
shortName: "zkSync Sepolia",
rpcUrl: "https://sepolia.era.zksync.dev",
blockExplorerUrl: "https://sepolia.explorer.zksync.io",
blockExplorerApi: "https://block-explorer-api.sepolia.zksync.dev",
Expand All @@ -102,7 +97,6 @@ export const zkSyncNetworks: ZkSyncNetwork[] = [
id: 280,
key: "goerli",
name: "zkSync Goerli Testnet",
shortName: "zkSync Goerli",
rpcUrl: "https://testnet.era.zksync.dev",
blockExplorerUrl: "https://goerli.explorer.zksync.io",
blockExplorerApi: "https://block-explorer-api.testnets.zksync.dev",
Expand All @@ -115,7 +109,6 @@ export const zkSyncNetworks: ZkSyncNetwork[] = [
id: 270,
key: "stage",
name: "zkSync Stage",
shortName: "zkSync Stage",
rpcUrl: "https://z2-dev-api.zksync.dev",
blockExplorerUrl: "https://goerli-beta.staging-scan-v2.zksync.dev",
blockExplorerApi: "https://block-explorer-api.stage.zksync.dev",
Expand Down
1 change: 0 additions & 1 deletion hyperchains/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ Array<{
id: number; // L2 Network ID
rpcUrl: string; // L2 RPC URL
name: string;
shortName: string;
blockExplorerUrl?: string; // L2 Block Explorer URL
hidden?: boolean; // Hidden in the network selector
l1Network?: { // @wagmi `Chain` structure https://wagmi.sh/core/chains#build-your-own
Expand Down
1 change: 0 additions & 1 deletion hyperchains/example.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"id": 1234,
"key": "my-hyperchain",
"name": "My new hyperchain",
"shortName": "My hyperchain",
"rpcUrl": "http://127.0.0.1:3050",
"l1Network": {
"id": 9,
Expand Down
2 changes: 1 addition & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const depositMethods = computed(() => {
methods.push({
props: {
label: "View your address",
description: `Receive tokens from another ${eraNetwork.value.shortName} account`,
description: `Receive tokens from another ${eraNetwork.value.name} account`,
as: "RouterLink",
to: {
name: "receive",
Expand Down
11 changes: 1 addition & 10 deletions scripts/hyperchains/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const createNetworkFromEnv = (envPath: string): Network => {
id: Number(env.CHAIN_ETH_ZKSYNC_NETWORK_ID),
key: baseName,
name: env.CHAIN_ETH_ZKSYNC_NETWORK,
shortName: env.CHAIN_ETH_ZKSYNC_NETWORK,
rpcUrl: env.API_WEB3_JSON_RPC_HTTP_URL,
l1Network: {
id: Number(env.ETH_CLIENT_CHAIN_ID),
Expand Down Expand Up @@ -102,21 +101,14 @@ const promptNetworkEnv = async () => {
return createNetworkFromEnv(pathJoin(envsDirectory, `${selectedEnv}.env`));
};
const promptNetworkInfo = async (network: Network) => {
const { name, shortName, l1NetworkName }: { name: string; shortName: string; l1NetworkName: string } = await prompt([
const { name, l1NetworkName }: { name: string; l1NetworkName: string } = await prompt([
{
message: "Displayed network name",
name: "name",
type: "input",
initial: network.name,
required: true,
},
{
message: "Displayed network short name",
name: "shortName",
type: "input",
initial: network.shortName,
required: true,
},
{
message: "Displayed L1 network name",
name: "l1NetworkName",
Expand All @@ -127,7 +119,6 @@ const promptNetworkInfo = async (network: Network) => {
]);

network.name = name;
network.shortName = shortName;
network.l1Network.name = l1NetworkName;
};

Expand Down
12 changes: 1 addition & 11 deletions scripts/hyperchains/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ const promptHyperchainInfo = async (): Promise<Network> => {
required: true,
},
]);
const { shortName }: { shortName: string } = await prompt([
{
message: "Displayed hyperchain short name",
name: "shortName",
type: "input",
required: true,
initial: name,
},
]);
const {
key,
rpcUrl,
Expand All @@ -41,7 +32,7 @@ const promptHyperchainInfo = async (): Promise<Network> => {
name: "key",
type: "input",
required: true,
initial: slugify(shortName, {
initial: slugify(name, {
lower: true,
replacement: "-",
strict: true,
Expand Down Expand Up @@ -137,7 +128,6 @@ const promptHyperchainInfo = async (): Promise<Network> => {
return {
id,
name,
shortName,
key,
rpcUrl,
blockExplorerUrl,
Expand Down

0 comments on commit 4313fe8

Please sign in to comment.