Skip to content

Commit

Permalink
fix: add base token address for hyperchain:configure
Browse files Browse the repository at this point in the history
Signed-off-by: Vasyl Ivanchuk <[email protected]>
  • Loading branch information
sanekmelnikov authored and vasyl-ivanchuk committed Aug 22, 2024
1 parent cd679cf commit cfad4be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/app/src/composables/useEnvironmentConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { computed, ref } from "vue";

import type { EnvironmentConfig, NetworkConfig, RuntimeConfig } from "@/configs";

import { BASE_TOKEN_L2_ADDRESS } from "@/utils/constants";
import { checksumAddress } from "@/utils/formatters";

const config = ref<EnvironmentConfig | null>(null);
Expand All @@ -28,7 +29,7 @@ export async function loadEnvironmentConfig(runtimeConfig: RuntimeConfig): Promi
}

envConfig.networks?.forEach((networkConfig) => {
networkConfig.baseTokenAddress = checksumAddress(networkConfig.baseTokenAddress);
networkConfig.baseTokenAddress = checksumAddress(networkConfig.baseTokenAddress || BASE_TOKEN_L2_ADDRESS);
});

config.value = envConfig;
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const BASE_TOKEN_L2_ADDRESS = "0x000000000000000000000000000000000000800A";
export const PROXY_CONTRACT_IMPLEMENTATION_ABI = [
{
inputs: [],
Expand Down
1 change: 1 addition & 0 deletions scripts/setup-hyperchain-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const buildAppConfig = (zkSyncEnvs: { [key: string]: string }) => ({
name: zkSyncEnvs.CHAIN_ETH_ZKSYNC_NETWORK || "",
published: true,
rpcUrl: zkSyncEnvs.API_WEB3_JSON_RPC_HTTP_URL || "",
baseTokenAddress: "0x000000000000000000000000000000000000800A",
}]
});

Expand Down

0 comments on commit cfad4be

Please sign in to comment.