Skip to content

Commit

Permalink
feat(status-page): handle multiple layers (#13770)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed May 17, 2023
1 parent 40086b1 commit 92a4d56
Show file tree
Hide file tree
Showing 9 changed files with 441 additions and 388 deletions.
23 changes: 14 additions & 9 deletions packages/status-page/.default.env
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
VITE_NODE_ENV=dev
VITE_L1_RPC_URL="https://l1rpc.a1.taiko.xyz"
VITE_L2_RPC_URL="https://l2rpc.a1.taiko.xyz"
VITE_TAIKO_L2_ADDRESS="0x0000777700000000000000000000000000000001"
VITE_TAIKO_L1_ADDRESS="0x7B3AF414448ba906f02a1CA307C56c4ADFF27ce7"
VITE_L1_EXPLORER_URL="https://l1explorer.a1.taiko.xyz"
VITE_L2_EXPLORER_URL="https://l2explorer.a1.taiko.xyz"
VITE_FEE_TOKEN_SYMBOL="TKO";
VITE_NODE_ENV=production
VITE_L1_RPC_URL="https://l1rpc.internal.taiko.xyz"
VITE_L2_RPC_URL="https://l2rpc.internal.taiko.xyz"
VITE_L3_RPC_URL="https://l2rpc.internal.taiko.xyz"
VITE_L2_TAIKO_L2_ADDRESS="0x1000777700000000000000000000000000000001"
VITE_L2_TAIKO_L1_ADDRESS="0x0B306BF915C4d645ff596e518fAf3F9669b97016"
VITE_L3_TAIKO_L2_ADDRESS="0x1000777700000000000000000000000000000001"
VITE_L3_TAIKO_L1_ADDRESS="0x0B306BF915C4d645ff596e518fAf3F9669b97016"
VITE_L1_EXPLORER_URL="https://l1explorer.internal.taiko.xyz"
VITE_L2_EXPLORER_URL="https://l2explorer.internal.taiko.xyz"
VITE_L3_EXPLORER_URL="https://l3explorer.internal.taiko.xyz"
VITE_FEE_TOKEN_SYMBOL=TTKO
VITE_ORACLE_PROVER_ADDRESS="0x1567CDAb5F7a69154e61A16D8Ff5eE6A3e991b39"
VITE_EVENT_INDEXER_API_URL="http://localhost:4100"
VITE_L2_EVENT_INDEXER_API_URL="http://localhost:4100"
VITE_L3_EVENT_INDEXER_API_URL="http://localhost:4100"
23 changes: 2 additions & 21 deletions packages/status-page/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,13 @@
import { setupI18n } from "./i18n";
import Navbar from "./components/Navbar.svelte";
import { ethers } from "ethers";
import { layer } from "./store/layer";
import { Layer } from "./domain/layer";
setupI18n({ withLocale: "en" });
const l1Provider = new ethers.providers.JsonRpcProvider(
import.meta.env.VITE_L1_RPC_URL
);
const l2Provider = new ethers.providers.JsonRpcProvider(
import.meta.env.VITE_L2_RPC_URL
);
const routes = {
"/": wrap({
component: Home,
props: {
l1Provider: l1Provider,
l1TaikoAddress: import.meta.env.VITE_TAIKO_L1_ADDRESS,
l2Provider: l2Provider,
l2TaikoAddress: import.meta.env.VITE_TAIKO_L2_ADDRESS,
l1ExplorerUrl: import.meta.env.VITE_L1_EXPLORER_URL,
l2ExplorerUrl: import.meta.env.VITE_L2_EXPLORER_URL,
feeTokenSymbol: import.meta.env.VITE_FEE_TOKEN_SYMBOL || "TKO",
oracleProverAddress:
import.meta.env.ORACLE_PROVER_ADDRESS ||
"0x1567CDAb5F7a69154e61A16D8Ff5eE6A3e991b39",
eventIndexerApiUrl: import.meta.env.VITE_EVENT_INDEXER_API_URL,
},
userData: {},
}),
};
</script>
Expand Down
4 changes: 4 additions & 0 deletions packages/status-page/src/domain/layer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export enum Layer {
Two,
Three,
}

0 comments on commit 92a4d56

Please sign in to comment.